当前位置: 首页>>代码示例>>PHP>>正文


PHP Location::view方法代码示例

本文整理汇总了PHP中Location::view方法的典型用法代码示例。如果您正苦于以下问题:PHP Location::view方法的具体用法?PHP Location::view怎么用?PHP Location::view使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Location的用法示例。


在下文中一共展示了Location::view方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: alertstatus

 /**
  * Put your own methods below this...
  */
 function alertstatus()
 {
     $this->auth->check_access('site/settings', TRUE);
     /* load models */
     $this->load->model('alertstatus_model', 'alert');
     $alerts = $this->alert->get_alerts();
     if ($alerts->num_rows() > 0) {
         foreach ($alerts->result() as $alert) {
             $imgstat = 'off';
             if ($alert->alert_active == 'y') {
                 $imgstat = 'on';
             }
             $data['alerts'][$alert->alert_id] = array('img' => array('src' => Location::asset('images/alerts', $alert->alert_image . '-' . $imgstat . '.png'), 'alt' => $alert->alert_name, 'class' => $imgstat, 'currStat' => $alert->alert_image, 'id' => 'al' . $alert->alert_id), 'name' => $alert->alert_name, 'desc' => $alert->alert_description, 'active' => $alert->alert_active, 'id' => $alert->alert_id, 'imgbase' => $alert->alert_image);
             $data_js['img'][$alert->alert_id] = array('src' => $alert->alert_image . '-hover.png', 'id' => $alert->alert_id);
         }
     }
     $data['loading'] = array('src' => Location::asset('images/alerts', 'black-bg-loading.gif'), 'alt' => '', 'class' => 'image');
     $data['imglocation'] = base_url() . Location::asset('images/alerts', '');
     $data['activealert'] = $this->alert->get_current_alert();
     $data['header'] = 'Alert Status';
     $data['text'] = 'Set the current alert status of your ship by clicking on the proper alert claxon.';
     $this->_regions['content'] = Location::view('admin_alertstatus', $this->skin, 'admin', $data);
     $this->_regions['javascript'] = Location::js('admin_alertstatus_js', $this->skin, 'admin');
     $this->_regions['title'] .= $data['header'];
     Template::assign($this->_regions);
     Template::render();
 }
开发者ID:rajeltomari,项目名称:Sim-Alert,代码行数:30,代码来源:admin.php

示例2: modmanifest

 public function modmanifest()
 {
     // load the models
     if (isset($_POST['submit'])) {
         $showSpecies = $this->input->post('chkShowSpecies', true);
         $showGender = $this->input->post('chkShowGender', true);
         $showThumbnail = $this->input->post('chkShowThumbnail', true);
         $setting_data = array('setting_value' => $showSpecies);
         $update_settings = $this->settings->update_setting('modManifest_show_species', $setting_data);
         $setting_data = array('setting_value' => $showGender);
         $update_settings = $this->settings->update_setting('modManifest_show_gender', $setting_data);
         $setting_data = array('setting_value' => $showThumbnail);
         $update_settings = $this->settings->update_setting('modManifest_show_thumbnail', $setting_data);
         $message = "Settings updated sucessfully.";
         $flash['status'] = 'success';
         $flash['message'] = text_output($message);
     }
     $data['checkboxes']['show_species'] = array('name' => 'chkShowSpecies', 'id' => 'chkShowSpecies', 'value' => 'true');
     $data['checkboxes']['show_gender'] = array('name' => 'chkShowGender', 'id' => 'chkShowGender', 'value' => 'true');
     $data['checkboxes']['show_thumbnail'] = array('name' => 'chkShowThumbnail', 'id' => 'chkShowThumbnail', 'value' => 'true');
     $set_species = $this->settings->get_setting('modManifest_show_species');
     $set_gender = $this->settings->get_setting('modManifest_show_gender');
     $set_thumbnail = $this->settings->get_setting('modManifest_show_thumbnail');
     $data['temp'] = $set_species;
     $data['checkboxes']['show_species']['checked'] = $set_species;
     $data['checkboxes']['show_gender']['checked'] = $set_gender;
     $data['checkboxes']['show_thumbnail']['checked'] = $set_thumbnail;
     $data['submit'] = array('type' => 'submit', 'class' => 'button-main', 'name' => 'submit', 'value' => 'submit', 'content' => ucwords(lang('actions_submit')));
     $data['header'] = "Manifest Details Configuration";
     $view_loc = "admin_modmanifest";
     $this->_regions['content'] = Location::view($view_loc, $this->skin, 'admin', $data);
     $this->_regions['title'] .= $data['header'];
     Template::assign($this->_regions);
     Template::render();
 }
开发者ID:rajeltomari,项目名称:Manifest-Details,代码行数:35,代码来源:admin.php

示例3: index

 /**
  * Put your own methods below this...
  */
 function index()
 {
     /* other data used by the view */
     $data['header'] = ucwords(lang('labels_the') . ' ' . lang('global_sim'));
     $data['msg_sim'] = $this->msgs->get_message('sim');
     /* load models */
     $this->load->model('alertstatus_model', 'alert');
     $currAlert = $this->alert->get_current_alert();
     $data['alertimg'] = array('src' => Location::asset('images/alerts', $currAlert->alert_image . '-on.png'), 'alt' => $currAlert->alert_name, 'id' => 'al' . $currAlert->alert_id);
     $this->_regions['content'] = Location::view('sim_index', $this->skin, 'main', $data);
     $this->_regions['title'] .= $data['header'];
     Template::assign($this->_regions);
     Template::render();
 }
开发者ID:rajeltomari,项目名称:Sim-Alert,代码行数:17,代码来源:sim.php

示例4: index

 /**
  * Put your own methods below this...
  */
 function index()
 {
     // Adds Mibbit chat to main
     $this->config->load('mibbit', TRUE);
     if ($this->auth->is_logged_in()) {
         $data['name'] = $this->user->get_user($this->session->userdata('userid'), 'name');
         $nickname = $this->_is_valid_nickname($data['name']) ? $data['name'] : '';
     } else {
         // You can alter the 100,999 to change the range of numbers you want the system to
         // generate a random number from. It's current setting chooses from 100-999.
         $data['name'] = $this->config->item('guest_prefix') . mt_rand(100, 999);
         $nickname = $this->_is_valid_nickname($data['name']) ? $data['name'] : '';
     }
     // Establish some replacement variables
     $channel = str_replace("#", "%23", $this->config->item('channel', 'mibbit'));
     $nickname = str_replace(" ", "_", $nickname);
     $nickname = str_replace(".", "_", $nickname);
     // Store config items into variables
     $server_name = $this->config->item('server_name', 'mibbit');
     $server_address = $this->config->item('server_address', 'mibbit');
     $widgetid = $this->config->item('widgetid', 'mibbit');
     // URI address for widget
     $uri = 'http://widget.mibbit.com/?nick=' . ($nickname .= '&server=' . ($server_address .= '&channel=' . ($channel .= '&settings=' . ($widgetid .= '&customprompt=Welcome%20to%20' . $server_name . '%20-%20' . ($channel .= '&customloading=Please%20wait...%20Loading%20chat&chatOutputShowTimes=true&userListFontSize=12')))));
     $data['stats'] = $this->config->item('stats_page_url', 'mibbit');
     $data['width'] = $this->config->item('width', 'mibbit');
     $data['height'] = $this->config->item('height', 'mibbit');
     $data['uri'] = $uri;
     // Header Info
     $data['header'] = $this->options['sim_name'] . "'s Mibbit " . $this->lang->line('mtitle');
     // Labels
     $data['mlabel'] = array('stats_begin' => $this->lang->line('mlabels_stats_begin'), 'stats_end' => $this->lang->line('mlabels_stats_end'), 'irc_help' => $this->lang->line('mlabels_help'), 'irc_new' => $this->lang->line('mlabels_new'), 'clear' => $this->lang->line('mlabels_clear'), 'nickname' => $this->lang->line('mlabels_nickname'), 'query' => $this->lang->line('mlabels_query'), 'whois' => $this->lang->line('mlabels_whois'), 'emote' => $this->lang->line('mlabels_emote'), 'away' => $this->lang->line('mlabels_away'), 'back' => $this->lang->line('mlabels_back'), 'real1' => $this->lang->line('mlabels_real1'), 'click_here' => $this->lang->line('mlabels_click'), 'real2' => $this->lang->line('mlabels_real2'), 'iframe' => $this->lang->line('mlabels_iframe'), 'new_window1' => $this->lang->line('mlabels_new_window1'), 'new_window2' => $this->lang->line('mlabels_new_window2'), 'sim_name' => $this->lang->line('mlabels_sim_name'));
     $data['header'] = $this->options['sim_name'] . "'s Mibbit " . $this->lang->line('mtitle');
     $this->_regions['content'] = Location::view('chat_index', $this->skin, 'chat', $data);
     $this->_regions['title'] .= $data['header'];
     Template::assign($this->_regions);
     Template::render();
 }
开发者ID:rajeltomari,项目名称:Mibbit-Chat,代码行数:40,代码来源:chat.php

示例5: character


//.........这里部分代码省略.........
         $data['awardcount'] = $this->awards->count_character_awards($id);
         $data['last_post'] = mdate($this->options['date_format'], gmt_to_local($character->last_post, $this->timezone, $this->dst));
         $name_array = array('first_name' => $character->first_name, 'middle_name' => $character->middle_name, 'last_name' => $character->last_name, 'suffix' => $character->suffix);
         $name = parse_name($name_array);
         $abbr_name = parse_name(array('first_name' => $character->first_name, 'last_name' => $character->last_name));
         $rank = $this->ranks->get_rank($character->rank, 'rank_name');
         $data['character_info'] = array(array('label' => ucfirst(lang('labels_name')), 'value' => $name), array('label' => ucfirst(lang('global_position')), 'value' => $this->pos->get_position($character->position_1, 'pos_name')), array('label' => ucwords(lang('order_second') . ' ' . lang('global_position')), 'value' => $this->pos->get_position($character->position_2, 'pos_name')), array('label' => ucfirst(lang('global_rank')), 'value' => $rank));
         $data['character']['id'] = $id;
         $data['character']['name'] = $name;
         $data['character']['rank'] = $character->rank;
         $data['character']['position_1'] = $character->position_1;
         $data['character']['position_2'] = $character->position_2;
         $data['character']['user'] = $character->user;
         if ($character->images > '') {
             $images = explode(',', $character->images);
             $images_count = count($images);
             $src = strstr($images[0], 'http://') !== false ? $images[0] : base_url() . Location::asset('images/characters', trim($images[0]));
             $data['character']['image'] = array('src' => $src, 'alt' => $name, 'class' => 'image', 'width' => 200);
             $data['character']['image_array'] = array();
             for ($i = 1; $i < $images_count; $i++) {
                 $src = strstr($images[$i], 'http://') !== false ? trim($images[$i]) : base_url() . Location::asset('images/characters', trim($images[$i]));
                 $data['character']['image_array'][] = array('src' => $src, 'alt' => $name, 'class' => 'image');
             }
         } else {
             $data['character']['noavatar'] = array('src' => Location::img('no-avatar.png', $this->skin, 'main'), 'alt' => '', 'class' => 'image', 'width' => 200);
         }
         $tabs = $this->char->get_bio_tabs();
         $sections = $this->char->get_bio_sections();
         if ($tabs->num_rows() > 0) {
             $i = 1;
             foreach ($tabs->result() as $tab) {
                 $data['tabs'][$i]['id'] = $tab->tab_id;
                 $data['tabs'][$i]['name'] = $tab->tab_name;
                 $data['tabs'][$i]['link'] = $tab->tab_link_id;
                 ++$i;
             }
         }
         if ($sections->num_rows() > 0) {
             $i = 1;
             foreach ($sections->result() as $sec) {
                 $fields = $this->char->get_bio_fields($sec->section_id);
                 if ($fields->num_rows() > 0) {
                     $j = 1;
                     foreach ($fields->result() as $field) {
                         $data['fields'][$sec->section_id][$j]['label'] = $field->field_label_page;
                         $data['fields'][$sec->section_id][$j]['value'] = false;
                         $info = $this->char->get_field_data($field->field_id, $id);
                         if ($info->num_rows() > 0) {
                             foreach ($info->result() as $item) {
                                 $data['fields'][$sec->section_id][$j]['value'] = $item->data_value;
                             }
                         }
                         ++$j;
                     }
                 }
                 if ($tabs->num_rows() > 0) {
                     $data['sections'][$sec->section_tab][$i]['id'] = $sec->section_id;
                     $data['sections'][$sec->section_tab][$i]['name'] = $sec->section_name;
                 } else {
                     $data['sections'][$i]['id'] = $sec->section_id;
                     $data['sections'][$i]['name'] = $sec->section_name;
                 }
                 ++$i;
             }
         }
         // set the header
         $data['header'] = $rank . ' ' . $abbr_name;
         $this->_regions['title'] .= ucfirst(lang('labels_biography')) . ' - ' . $abbr_name;
     } else {
         $data['header'] = sprintf(lang('error_title_invalid_char'), ucfirst(lang('global_character')));
         $data['msg_error'] = sprintf(lang_output('error_msg_invalid_char'), lang('global_character'));
         $this->_regions['title'] .= lang('error_pagetitle');
     }
     if (Auth::is_logged_in()) {
         $data['edit_valid_form'] = Auth::check_access('site/bioform', false) ? true : false;
         if (Auth::check_access('characters/bio', false) === true) {
             if (Auth::get_access_level('characters/bio') == 3) {
                 $data['edit_valid'] = true;
             } elseif (Auth::get_access_level('characters/bio') == 2) {
                 $characters = $this->char->get_user_characters($this->session->userdata('userid'), '', 'array');
                 $data['edit_valid'] = (in_array($id, $characters) or $character->crew_type == 'npc') ? true : false;
             } elseif (Auth::get_access_level('characters/bio') == 1) {
                 $characters = $this->char->get_user_characters($this->session->userdata('userid'), '', 'array');
                 $data['edit_valid'] = in_array($id, $characters);
             } else {
                 $data['edit_valid'] = false;
             }
         } else {
             $data['edit_valid'] = false;
         }
     } else {
         $data['edit_valid'] = false;
         $data['edit_valid_form'] = false;
     }
     $data['label'] = array('edit' => ucwords(lang('actions_edit') . ' ' . lang('global_character')), 'view_all_posts' => ucwords(lang('actions_seeall') . ' ' . lang('global_missionposts')), 'view_all_logs' => ucwords(lang('actions_seeall') . ' ' . lang('global_personallogs')), 'view_all_awards' => ucwords(lang('actions_seeall') . ' ' . lang('global_awards')), 'view_all_images' => ucwords(lang('actions_seeall') . ' ' . lang('labels_images')), 'view_user' => ucwords(lang('global_user') . ' ' . lang('labels_info')), 'mission_posts' => ucwords(lang('global_missionposts')), 'personal_logs' => ucwords(lang('global_personallogs')), 'news_items' => ucwords(lang('global_newsitems')), 'comments' => ucwords(lang('labels_comments')), 'last_post' => ucwords(lang('order_last') . ' ' . lang('global_post')), 'stats' => ucfirst(lang('labels_stats')), 'back_manifest' => LARROW . ' ' . ucfirst(lang('actions_back')) . ' ' . lang('labels_to') . ' ' . ucfirst(lang('labels_manifest')));
     $this->_regions['content'] = Location::view('personnel_character', $this->skin, 'main', $data);
     $this->_regions['javascript'] = Location::js('personnel_character_js', $this->skin, 'main');
     Template::assign($this->_regions);
     Template::render();
 }
开发者ID:rajeltomari,项目名称:Join-Form,代码行数:101,代码来源:personnel.php

示例6: join

 public function join()
 {
     $this->load->model('positions_model', 'pos');
     $this->load->model('depts_model', 'dept');
     $this->load->model('ranks_model', 'ranks');
     $this->load->helper('utility');
     $agree = $this->input->post('agree', true);
     $submit = $this->input->post('submit', true);
     $selected_pos = $this->input->post('position', true);
     $data['selected_position'] = (is_numeric($selected_pos) and $selected_pos > 0) ? $selected_pos : 0;
     $desc = $this->pos->get_position($data['selected_position'], 'pos_desc');
     $data['pos_desc'] = $desc !== false ? $desc : false;
     if ($submit !== false) {
         $email = $this->input->post('email', true);
         $real_name = $this->input->post('name', true);
         $im = $this->input->post('instant_message', true);
         $dob = $this->input->post('date_of_birth', true);
         $password = $this->input->post('password', true);
         $first_name = $this->input->post('first_name', true);
         $middle_name = $this->input->post('middle_name', true);
         $last_name = $this->input->post('last_name', true);
         $suffix = $this->input->post('suffix', true);
         $position = $this->input->post('position_1', true);
         $new_member = $this->input->post('new_member', true);
         if ($position == 0 or $first_name == '' or empty($password) or empty($email)) {
             $message = sprintf(lang('flash_empty_fields'), lang('flash_fields_join'), lang('actions_submit'), lang('actions_join') . ' ' . lang('actions_request'));
             $flash['status'] = 'error';
             $flash['message'] = text_output($message);
         } else {
             $ban['ip'] = $this->sys->get_item('bans', 'ban_ip', $this->input->ip_address());
             $ban['email'] = $this->sys->get_item('bans', 'ban_email', $email);
             if ($ban['ip'] !== false or $ban['email'] !== false) {
                 $message = sprintf(lang('text_ban_join'), lang('global_sim'), lang('global_game_master'));
                 $flash['status'] = 'error';
                 $flash['message'] = text_output($message);
             } else {
                 $this->load->model('applications_model', 'apps');
                 $check_user = $this->user->check_email($email);
                 if ($check_user === false) {
                     // build the users data array
                     $user_array = array('name' => $real_name, 'email' => $email, 'password' => Auth::hash($password), 'instant_message' => $im, 'date_of_birth' => $dob, 'join_date' => now(), 'status' => 'pending', 'skin_main' => $this->sys->get_skinsec_default('main'), 'skin_admin' => $this->sys->get_skinsec_default('admin'), 'skin_wiki' => $this->sys->get_skinsec_default('wiki'), 'display_rank' => $this->ranks->get_rank_default());
                     $users = $this->user->create_user($user_array);
                     $user_id = $this->db->insert_id();
                     $prefs = $this->user->create_user_prefs($user_id);
                     $my_links = $this->sys->update_my_links($user_id);
                 }
                 $user = $check_user === false ? $user_id : $check_user;
                 $character_array = array('user' => $user, 'first_name' => $first_name, 'middle_name' => $middle_name, 'last_name' => $last_name, 'suffix' => $suffix, 'position_1' => $position, 'crew_type' => 'pending', 'new_member' => $new_member);
                 $character = $this->char->create_character($character_array);
                 $character_id = $this->db->insert_id();
                 if ($check_user === false) {
                     $main_char = array('main_char' => $character_id);
                     $update_main = $this->user->update_user($user, $main_char);
                 }
                 $this->sys->optimize_table('characters');
                 $this->sys->optimize_table('users');
                 $name = array($first_name, $middle_name, $last_name, $suffix);
                 $app_array = array('app_email' => $email, 'app_ip' => $this->input->ip_address(), 'app_user' => $user, 'app_user_name' => $real_name, 'app_character' => $character_id, 'app_character_name' => parse_name($name), 'app_position' => $this->pos->get_position($position, 'pos_name'), 'app_date' => now(), 'new_member' => $new_member);
                 $apps = $this->apps->insert_application($app_array);
                 foreach ($_POST as $key => $value) {
                     if (is_numeric($key)) {
                         // build the array
                         $array = array('data_field' => $key, 'data_char' => $character_id, 'data_user' => $user, 'data_value' => $value, 'data_updated' => now());
                         // insert the data
                         $this->char->create_character_data($array);
                     }
                 }
                 if ($character < 1 and $users < 1) {
                     $message = sprintf(lang('flash_failure'), ucfirst(lang('actions_join') . ' ' . lang('actions_request')), lang('actions_submitted'), lang('flash_additional_contact_gm'));
                     $flash['status'] = 'error';
                     $flash['message'] = text_output($message);
                 } else {
                     $user_data = array('email' => $email, 'password' => $password, 'name' => $real_name);
                     $email_user = $this->options['system_email'] == 'on' ? $this->_email('join_user', $user_data) : false;
                     $gm_data = array('email' => $email, 'name' => $real_name, 'id' => $character_id, 'user' => $user, 'sample_post' => $this->input->post('sample_post'), 'ipaddr' => $this->input->ip_address());
                     $email_gm = $this->options['system_email'] == 'on' ? $this->_email('join_gm', $gm_data) : false;
                     $message = sprintf(lang('flash_success'), ucfirst(lang('actions_join') . ' ' . lang('actions_request')), lang('actions_submitted'), '');
                     $flash['status'] = 'success';
                     $flash['message'] = text_output($message);
                 }
             }
         }
         $this->_regions['flash_message'] = Location::view('flash', $this->skin, 'main', $flash);
     } elseif ($this->options['system_email'] == 'off') {
         $flash['status'] = 'info';
         $flash['message'] = lang_output('flash_system_email_off');
         $this->_regions['flash_message'] = Location::view('flash', $this->skin, 'main', $flash);
     }
     if ($agree == false and $submit == false) {
         $data['msg'] = $this->msgs->get_message('join_disclaimer');
         if ($this->uri->segment(3) != false) {
             $data['position'] = $this->uri->segment(3);
         }
         $view_loc = 'main_join_1';
     } else {
         $sections = $this->char->get_bio_sections();
         if ($sections->num_rows() > 0) {
             foreach ($sections->result() as $sec) {
                 $sid = $sec->section_id;
                 $data['join'][$sid]['name'] = $sec->section_name;
//.........这里部分代码省略.........
开发者ID:rajeltomari,项目名称:Join-Form,代码行数:101,代码来源:main.php

示例7: bio


//.........这里部分代码省略.........
                 break;
             case 'makeplaying':
                 if ($level == 3) {
                     $maincharacter = isset($_POST['main_character']) ? $_POST['main_character'] : false;
                     $user = isset($_POST['user']) ? $this->input->post('user') : false;
                     $c = $this->char->get_character($id);
                     $u = $this->user->get_user($user);
                     if ($u->status == 'inactive') {
                         $user_update_data['status'] = 'active';
                         $user_update_data['leave_date'] = null;
                         $user_update_data['last_update'] = now();
                         $user_update_data['access_role'] = Access_Model::STANDARD;
                     }
                     if ($maincharacter) {
                         $user_update_data['main_char'] = $id;
                         $user_update_data['last_update'] = now();
                     }
                     $character_update_data['crew_type'] = 'active';
                     $character_update_data['user'] = $user;
                     $this->pos->update_open_slots($c->position_1, 'add_crew');
                     if ($c->position_2 > 0 and $c->position_2 !== null) {
                         $this->pos->update_open_slots($c->position_2, 'add_crew');
                     }
                     if (isset($user_update_data)) {
                         $update_user = $this->user->update_user($user, $user_update_data);
                     }
                     $update_char = $this->char->update_character($id, $character_update_data);
                     $message = sprintf($update_char > 0 ? lang('flash_success') : lang('flash_failure'), ucfirst(lang('global_character')), lang('actions_updated'), '');
                     $flash['status'] = $update_char > 0 ? 'success' : 'error';
                     $flash['message'] = text_output($message);
                 }
                 break;
         }
         $this->_regions['flash_message'] = Location::view('flash', $this->skin, 'admin', $flash);
     }
     $char = $this->char->get_character($id);
     $sections = $this->char->get_bio_sections();
     if ($sections->num_rows() > 0) {
         foreach ($sections->result() as $sec) {
             $sid = $sec->section_id;
             $data['join'][$sid]['name'] = $sec->section_name;
             $fields = $this->char->get_bio_fields($sec->section_id);
             if ($fields->num_rows() > 0) {
                 foreach ($fields->result() as $field) {
                     $f_id = $field->field_id;
                     $data['join'][$sid]['fields'][$f_id]['field_label'] = $field->field_label_page;
                     $info = $this->char->get_field_data($field->field_id, $data['id']);
                     $row = $info->num_rows() > 0 ? $info->row() : false;
                     switch ($field->field_type) {
                         case 'text':
                             $input = array('name' => $field->field_id, 'id' => $field->field_fid, 'class' => $field->field_class, 'value' => $row !== false ? $row->data_value : '');
                             $data['join'][$sid]['fields'][$f_id]['input'] = form_input($input);
                             break;
                         case 'textarea':
                             $input = array('name' => $field->field_id, 'id' => $field->field_fid, 'class' => $field->field_class, 'value' => $row !== false ? $row->data_value : '', 'rows' => $field->field_rows);
                             $data['join'][$sid]['fields'][$f_id]['input'] = form_textarea($input);
                             break;
                         case 'select':
                             $value = false;
                             $values = false;
                             $input = false;
                             $values = $this->char->get_bio_values($field->field_id);
                             $data_val = $row !== false ? $row->data_value : '';
                             if ($values->num_rows() > 0) {
                                 foreach ($values->result() as $value) {
                                     $input[$value->value_field_value] = $value->value_content;
开发者ID:rajeltomari,项目名称:Join-Form,代码行数:67,代码来源:characters.php

示例8: index


//.........这里部分代码省略.........
                                         $char_img = '';
                                         if ($char->images > '') {
                                             // get the images
                                             $images = explode(',', $char->images);
                                             $images_count = count($images);
                                             $src = strstr($images[0], 'http://') !== false ? $images[0] : base_url() . Location::asset('images/characters', trim($images[0]));
                                             list($imgwidth, $imgheight, $imgtype, $imgattr) = getimagesize($src);
                                             if ($imgwidth < $imgheight) {
                                                 $factor = round($imgwidth / 80, 2);
                                             } else {
                                                 $factor = round($imgheight / 80, 2);
                                             }
                                             // set the image
                                             $char_img = array('src' => $src, 'alt' => $name, 'class' => 'charimg', 'height' => $imgheight / $factor, 'width' => $imgwidth / $factor);
                                         } else {
                                             //no image:
                                             // set the image
                                             list($imgwidth, $imgheight, $imgtype, $imgattr) = getimagesize(base_url() . Location::img('no-avatar.png', $this->skin, 'main'));
                                             if ($imgwidth < $imgheight) {
                                                 $factor = round($imgwidth / 80, 2);
                                             } else {
                                                 $factor = round($imgheight / 80, 2);
                                             }
                                             $char_img = array('src' => Location::img('no-avatar.png', $this->skin, 'main'), 'alt' => '', 'class' => 'charimg', 'height' => $imgheight / $factor, 'width' => $imgwidth / $factor);
                                         }
                                         // set the color
                                         $color = '';
                                         if ($char->user > 0) {
                                             $color = $this->user->get_loa($char->user) == 'loa' ? '_loa' : $color;
                                             $color = $this->user->get_loa($char->user) == 'eloa' ? '_eloa' : $color;
                                         }
                                         $color = $char->crew_type == 'npc' ? '_npc' : $color;
                                         // build the combadge image array
                                         $cb_img = array('src' => Location::cb('combadge' . $color . '.png', $this->skin, 'main'), 'alt' => ucwords(lang('actions_view') . ' ' . lang('labels_bio')), 'class' => 'image');
                                         $f_species = $this->char->get_field_data(2, $char->charid);
                                         if ($f_species->num_rows() > 0) {
                                             $fr_species = $f_species->result();
                                             $species = $fr_species[0]->data_value;
                                         }
                                         $f_gender = $this->char->get_field_data(1, $char->charid);
                                         if ($f_gender->num_rows() > 0) {
                                             $fr_gender = $f_gender->result();
                                             $gender = $fr_gender[0]->data_value;
                                         }
                                         if ($char->crew_type == 'active' and empty($char->user)) {
                                             // don't do anything
                                         } else {
                                             // set the data for the characters in a position in a sub dept
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['char_id'] = $char->charid;
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['name'] = $name;
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['rank_img'] = $rank_img;
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['crew_type'] = $char->crew_type;
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['combadge'] = $cb_img;
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['char_gender'] = $gender;
                                             //1=gender
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['char_species'] = $species;
                                             //2=species
                                             $data['depts'][$dept]['sub'][$a]['pos'][$b]['chars'][$c]['char_image'] = $char_img;
                                             ++$c;
                                         }
                                     }
                                 }
                                 ++$b;
                             }
                         }
                         ++$a;
开发者ID:rajeltomari,项目名称:Manifest-Details,代码行数:67,代码来源:personnel.php


注:本文中的Location::view方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。