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


PHP ul函数代码示例

本文整理汇总了PHP中ul函数的典型用法代码示例。如果您正苦于以下问题:PHP ul函数的具体用法?PHP ul怎么用?PHP ul使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: cache_docs

 private function cache_docs($root = 1, $mode = 'file')
 {
     $this->config->load('translations_a', false);
     $langs = $this->config->item('lang');
     $articles = $this->config->item('articles');
     $result = $this->db->query("SELECT\r\n\t\tsheets.redirect,\r\n\t\tsheets.parent,\r\n\t\tsheets.id,\r\n\t\tsheets.header,\r\n\t\tsheets1.header as topheader\r\n\t\tFROM\r\n\t\tsheets sheets1\r\n\t\tRIGHT OUTER JOIN sheets ON (sheets1.id = sheets.parent)\r\n\t\twhere sheets.active\r\n\t\tORDER BY\r\n\t\tsheets.parent DESC,\r\n\t\tsheets.pageorder", array($root));
     if ($result->num_rows()) {
         $this->load->helper('html');
         foreach ($langs as $lang => $langname) {
             $input = array();
             foreach ($result->result() as $row) {
                 $link = strlen($row->redirect) ? $row->redirect : '/page/docs/' . $row->id;
                 $groupname = isset($articles[$row->parent]) && strlen($articles[$row->parent][$lang]) ? $articles[$row->parent][$lang] : $row->topheader;
                 $itemname = isset($articles[$row->id]) && strlen($articles[$row->id][$lang]) ? $articles[$row->id][$lang] : $row->header;
                 $grouplink = '<a href="#"><i class="icon-tags"></i>&nbsp;&nbsp;' . $groupname . "</a>";
                 $itemlink = '<a href="' . $link . '"><i class="icon-tag"></i>&nbsp;&nbsp;' . $itemname . "</a>";
                 if (!isset($input[$grouplink])) {
                     $input[$grouplink] = array();
                 }
                 array_push($input[$grouplink], $itemlink);
             }
             foreach ($input as $key => $val) {
                 $list = $input[$key];
                 break;
             }
             //if($mode === 'file') {
             write_file('application/views/cache/menus/docs_' . $lang . '.php', ul($list, array('class' => 'dropdown-menu')));
             //} else {
             //	print '<link href="http://api.korzhevdp.com/css/frontend.css" rel="stylesheet" media="screen" type="text/css">'.ul($list, array('class' => 'dropdown-menu'))."<hr>";
             //}
         }
     }
 }
开发者ID:korzhevdp,项目名称:MiniGIS,代码行数:33,代码来源:cachemodel.php

示例2: database

 /**
  * database function.
  * 
  * @access public
  * @return void
  */
 public function database()
 {
     $this->output->enable_profiler(true);
     $this->load->database();
     $this->load->dbutil();
     $this->load->dbforge();
     $data['title'] = $this->system_model->get('app_name');
     $data['breadcrumbs'] = array(array('data' => anchor('/', $this->system_model->get('app_name')), 'mode' => 'unavailable'), array('data' => anchor('install', ucfirst(lang('install'))), 'mode' => 'unavailable'), array('data' => anchor('install/database', ucfirst(lang('install') . ' ' . lang('database'))), 'mode' => 'current'));
     $html = heading(ucfirst(lang('install')) . ' ' . lang('database'), 1);
     $current = $this->migration->current();
     if (is_null($current)) {
         $html .= div($this->migration->error_string(), 'alert-box error');
     } else {
         $html .= div('Klubb database version: ' . $current, 'alert-box success');
     }
     $tables = $this->db->list_tables();
     foreach ($tables as $table) {
         $fields = $this->db->list_fields($table);
         array_unshift($fields, strong('Fält:'));
         $fields = ul($fields, array('class' => 'inline-list'));
         $html .= div(heading('Tabell: ' . $table, 4) . $fields, 'radius panel');
     }
     $data['html'] = $html;
     $this->system_model->view('template', $data);
 }
开发者ID:nyfagel,项目名称:klubb,代码行数:31,代码来源:install.php

示例3: get_skillset_requirements_formatted

 public function get_skillset_requirements_formatted()
 {
     $this->_CI->load->helper('html');
     $lis = explode("\n", $this->skills_needed);
     $lis = array_map('trim', $lis);
     return ul($lis, array('class' => 'ul'));
 }
开发者ID:nonconforme,项目名称:FUEL-CMS,代码行数:7,代码来源:careers_model.php

示例4: menu

 function menu()
 {
     $pertenece = $this->session->userdata['panel'];
     //echo '--->'.$pertenece;
     if ($pertenece === FALSE) {
         $pertenece = 0;
     }
     $attr = array('name' => '_mp');
     $areglo = arr_menu();
     $amenu = '';
     $menu = array();
     foreach ($areglo as $data) {
         $link = site_url("/bienvenido/index/{$data['modulo']}");
         if ($data['modulo'] == $pertenece) {
             $attr['class'] = 'current';
         } else {
             $attr['class'] = '';
         }
         $attr['title'] = $data['mensaje'];
         $menu[] = anchor("/bienvenido/index/{$data['modulo']}", $data['titulo'], $attr);
         $amenu .= "<div id='sc{$data['modulo']}' class='tabcontent'>{$data['mensaje']}</div>\n";
     }
     if ($this->session->userdata('logged_in')) {
         $link = site_url("/bienvenido/cese");
         $menu[] = "<a href='{$link}' title='Cerrar Sessi&oacute;n'>Salir</a>";
         $amenu .= "<div id='salir_s' class='tabcontent'  >Cerrar Session</div>\n";
     }
     $data['menu'] = ul($menu);
     $data['amenu'] = '';
     //$amenu;
     return $this->layout->load->view($this->common . 'menu', $data, true);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:32,代码来源:layout_model.php

示例5: centinelas

 function centinelas()
 {
     $this->load->helper('directory');
     $this->load->library('table');
     $tmpl = array('row_start' => '<tr valign="top">');
     $this->table->set_template($tmpl);
     $map = directory_map('./system/logs/');
     $lista = array();
     foreach ($map as $file) {
         if ($file != 'index.html') {
             $lista[] = anchor("supervisor/mantenimiento/borracentinela/{$file}", 'X') . " <a href='javascript:void(0)' onclick=\"carga('{$file}')\" >{$file}</a>";
         }
     }
     $copy = "<br><a href='javascript:void(0)' class='mininegro'  onclick=\"copiar()\" >Copiar texto</a>";
     $tadata = array('name' => 'sql', 'id' => 'log', 'rows' => '20', 'cols' => '60');
     $form = form_open('ejecutasql/filteredgrid/process') . form_textarea($tadata) . '<br>' . form_submit('mysubmit', 'Ejecutar como SQL') . form_close();
     $this->table->add_row(ul($lista), '<b id="fnom">Seleccione un archivo de centinela</b><br>' . $form);
     $link = site_url('supervisor/mantenimiento/vercentinela');
     $data['script'] = "<script>\n\t\t  function carga(arch){\n\t\t    link='{$link}'+'/'+arch;\n\t\t    //alert(link);\n\t\t    \$('#fnom').text(arch);\n\t\t    \$('#log').load(link);\n\t\t  };\n\t\t  function copiar(){\n\t\t    \$('#log').copy();\n\t\t  };\n\t\t</script>";
     $data['content'] = $this->table->generate();
     $data['title'] = " Centinelas ";
     //script('plugins/jquery.clipboard.pack.js')
     $data["head"] = script("jquery.pack.js") . script('plugins/jquery.copy.min.js') . $this->rapyd->get_head() . style('marcos.css') . style('estilos.css');
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:25,代码来源:mantenimiento.php

示例6: update_images

 function update_images() {
     // Take in ajax of {id:description}
     // and update for those images accordingly
     if(!$this->input->is_ajax_request()) {
         echo "Do not access this page directly";
         return;
     }
     $out = array();
     if($data = json_decode($this->input->post('images'),true)){
         $imgs = array(); 
         foreach($data as $k=>$v) {
             if($v['delete'])
                 $out[] = $this->delete($k);
             else
                 $imgs[] = array("iid"=>$k,
                                 "description"=>$v['description'],
                                 "title"=>$v['title']
                             );
         }
      //  var_dump($imgs);
         $this->db->update_batch('images',$imgs,"iid");
         $out[] = "Updated ".$this->db->affected_rows(). " images";
         
     } else {
         echo "An error occurred, nothing was updated";
     }
     echo ul($out);
 }
开发者ID:JonnoFTW,项目名称:tpfc-website,代码行数:28,代码来源:Gallery.php

示例7: to_html

 /** Convert value to HTML parseable format
  * @param mixed $value
  * @return string
  */
 public static function to_html(\System\Template\Renderer $ren, $value)
 {
     if (is_object($value) && method_exists($value, 'to_html')) {
         return $value->to_html($ren);
     }
     if (is_array($value)) {
         $content = array();
         foreach ($value as $val) {
             $content[] = li(self::to_html($ren, $val));
         }
         return ul('plain inline', $content);
     }
     if ($value instanceof \DateTime) {
         return $ren->format_date($value, 'human');
     }
     if (gettype($value) == 'boolean') {
         return span($value = $value ? 'yes' : 'no', $ren->trans($value));
     }
     if (gettype($value) == 'float') {
         return number_format($value, 5);
     }
     if (gettype($value) == 'string') {
         return htmlspecialchars_decode($value);
     }
     return $value;
 }
开发者ID:just-paja,项目名称:fudjan,代码行数:30,代码来源:template.php

示例8: get_category_ul

function get_category_ul($attr = array())
{
    $category_array = array();
    foreach (get_instance()->mongo_db->category->find()->sort(array('order' => 1)) as $category) {
        $category_array[] = anchor('category/' . $category['slug'], $category['title']);
    }
    return ul($category_array, $attr);
}
开发者ID:navruzm,项目名称:navruz.net,代码行数:8,代码来源:category_helper.php

示例9: formata_cursos_lista

 /**
  * Retorna os cursos formatados em lista
  * @param  array  $cursos   
  * @param  array  $ordenada 
  * @return string           
  */
 public function formata_cursos_lista($cursos = array(), $ordenada = array())
 {
     $this->ci->load->helper('html');
     if ($ordenada) {
         return ol($cursos);
     }
     return ul($cursos);
 }
开发者ID:joel-medeiros,项目名称:codeigniter-treinaweb,代码行数:14,代码来源:Treinaweb.php

示例10: set_sections

    public function set_sections()
    {
        $this->EE->load->model('template_model');
        $this->EE->load->helper(array('html', 'url'));
        $this->EE->lang->loadfile('design');
        $this->EE->lang->loadfile('template_menu');
        $query = $this->EE->template_model->get_templates(NULL, array('templates.group_id'));
        $sections = array();
        $groups = array();
        foreach ($query->result() as $row) {
            $groups[$row->group_name] = $row->group_id;
            $sections[$row->group_name][] = anchor(BASE . AMP . 'C=design' . AMP . 'M=edit_template' . AMP . 'id=' . $row->template_id, $row->template_name, array('data-href' => site_url($row->group_name . '/' . $row->template_name)));
        }
        $search_form = form_open('C=design' . AMP . 'M=manager');
        $search_form .= form_input(array('type' => 'search', 'name' => 'template_keywords', 'value' => '', 'maxlength' => '80', 'class' => 'input', 'autosave' => 'ee_template_search', 'results' => '10', 'placeholder' => 'Search Template', 'style' => 'width:140px'));
        $search_form .= form_close();
        $this->sections[''] = ul(array($search_form, anchor(BASE . AMP . 'C=design' . AMP . 'M=new_template_group', '+ ' . $this->EE->lang->line('nav_create_group')), anchor(BASE . AMP . 'C=design' . AMP . 'M=manager', $this->EE->lang->line('manager')), anchor(BASE . AMP . 'C=design' . AMP . 'M=global_variables', $this->EE->lang->line('global_vars')), anchor(BASE . AMP . 'C=design' . AMP . 'M=snippets', $this->EE->lang->line('nav_snippets')), anchor(BASE . AMP . 'C=design' . AMP . 'M=sync_templates', $this->EE->lang->line('nav_sync_templates')), anchor(BASE . AMP . 'C=design' . AMP . 'M=global_template_preferences', $this->EE->lang->line('global_prefs')), anchor(BASE . AMP . 'C=design' . AMP . 'M=template_preferences_manager', $this->EE->lang->line('prefs_manager')), anchor('javascript:void(0);', $this->EE->lang->line('view_rendered'), array('id' => 'template_menu_mode')))) . '<div class="clear"></div>';
        foreach ($sections as $key => $value) {
            array_push($value, anchor(BASE . AMP . 'C=design' . AMP . 'M=new_template' . AMP . 'group_id=' . $groups[$key], '<span class="notice">+</span>', array('class' => 'add')));
            $this->sections[anchor(BASE . AMP . 'C=design' . AMP . 'M=edit_template_group' . AMP . 'group_id=' . $groups[$key], $key) . NBS . anchor(BASE . AMP . 'C=design' . AMP . 'M=template_group_delete_confirm' . AMP . 'group_id=' . $groups[$key], '<span class="notice">-</span>')] = ul($value);
        }
        $this->EE->cp->add_to_head('<style type="text/css">#template_menu_acc{padding:10px !important;}#template_menu_acc .accessorySection{padding:0 5px;}#template_menu_acc .accessorySectionFirst{float:none;border:none;border:0;margin-bottom:10px;line-height:20px;}#template_menu_acc .accessorySectionFirst li{float:left;margin-right:14px;}#template_menu_acc .accessorySectionFirst h5{display:none;}#template_menu_acc li a{display:block;padding:0 0 3px;}#template_menu_acc li{padding:0 !important;}#template_menu_acc h5{font-size:12px !important;margin-bottom:4px !important;}#template_menu_acc .accessorySection h5 a{color:white !important;}</style>');
        $this->EE->javascript->output('$("#template_menu_acc .accessorySection:first").addClass("accessorySectionFirst");');
        $this->EE->javascript->output('
		$("#template_menu_mode").click(function(){
			if ( ! $(this).hasClass("mode")) {
				$(this).addClass("mode");
				$(this).html("' . $this->EE->lang->line('edit_templates') . '");
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst) li a:not(.add)").each(function(){
					var href = $(this).attr("data-href");
					$(this).attr("data-href", $(this).attr("href")).attr("href", href);
				});
			} else {
				$(this).removeClass("mode");
				$(this).html("' . $this->EE->lang->line('view_rendered') . '");
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst) li a:not(.add)").each(function(){
					var href = $(this).attr("data-href");
					$(this).attr("data-href", $(this).attr("href")).attr("href", href);
				});
			}
		});');
        if ($this->always_open) {
            $this->EE->javascript->output('
				$(".template_menu_acc").parent().siblings().removeClass("current");
				$("#accessoriesDiv .accessory").hide();
				$(".template_menu_acc").parent().addClass("current");
				$("#template_menu_acc").show().attr("templateMenuHeight", 0);
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst)").each(function(){
					if ($(this).outerHeight() > Number($("#template_menu_acc").attr("templateMenuHeight"))) {
						$("#template_menu_acc").attr("templateMenuHeight", $(this).outerHeight());
					}
				});
				$("#template_menu_acc .accessorySection:not(.accessorySectionFirst)").height(Number($("#template_menu_acc").attr("templateMenuHeight")));
			');
        }
    }
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:56,代码来源:acc.template_menu.php

示例11: index

 /**
  * index function.
  * 
  * @access public
  * @return void
  */
 public function index()
 {
     $this->output->enable_profiler(false);
     $this->benchmark->mark('auth_start');
     if (!$this->auth->loggedin()) {
         redirect('user/login');
     }
     $uid = intval($this->auth->userid());
     $this->benchmark->mark('auth_end');
     $user = $this->user_model->get_user($uid);
     $greeting = '';
     if (isset($user['firstname'])) {
         $greeting = ' ' . $user['firstname'];
         $data['firstname'] = $user['firstname'];
     } else {
         $greeting = ' ' . $user['username'];
         $data['firstname'] = $user['firstname'];
     }
     $data['title'] = $this->system_model->get('app_name');
     $data['stylesheets'] = array('buttons_purple');
     $data['partial'] = 'home';
     $data['org_name'] = $this->system_model->get('org_name');
     $data['app_name'] = $this->system_model->get('app_name');
     $data['members'] = $this->member_model->count_members();
     $data['users'] = $this->user_model->count_users();
     $memberdata = heading(ucfirst(lang('members')), 5);
     $ofeachtype = array();
     $this->benchmark->mark('members_process_start');
     foreach ($this->member_model->get_types() as $type) {
         $count = $this->member_model->count_members_type($type['id']);
         array_push($ofeachtype, $count . ' ' . strtolower($type['plural']));
     }
     $data['membertypes'] = $ofeachtype;
     $memberdata .= p(ucfirst($data['org_name']) . ' har totalt ' . anchor('members', $data['members'] . ' ' . lang('members')) . ' varav:');
     $memberdata .= ul($data['membertypes'], array('class' => 'disc'));
     $memberdata .= button_group(array(button_anchor('members', ucfirst(lang('administer')) . ' ' . lang('members'), 'radius'), button_anchor('member/register', ucfirst(lang('register_member')), 'radius')), 'radius');
     $this->benchmark->mark('members_process_end');
     $userdata = heading(ucfirst(lang('users')), 5);
     $this->benchmark->mark('users_process_start');
     $userdata .= p(ucfirst($data['app_name']) . ' har totalt ' . anchor('admin/users', $data['users'] . ' ' . lang('users')) . '.');
     $active = $this->user_model->get_active();
     $ausers = array();
     foreach ($active as $aid) {
         $auser = $this->user_model->get_user($aid);
         array_push($ausers, $auser['firstname'] . ' ' . $auser['lastname']);
     }
     $data['loggedon'] = $ausers;
     $userdata .= heading(ucfirst(lang('currently_logged_on')) . ':', 6) . ul($ausers, array('class' => 'disc'));
     $userdata .= button_group(array(button_anchor('admin/users', ucfirst(lang('administer')) . ' ' . lang('users'), 'radius'), button_anchor('user/create', ucfirst(lang('create_user')), 'radius')), 'radius');
     $this->benchmark->mark('users_process_end');
     $content = heading(ucfirst(lang('welcome')) . $greeting . '!', 1);
     $content .= row(columns($memberdata, 6) . columns($userdata, 6));
     $html = $content;
     $data['html'] = $html;
     $this->system_model->view('template', $data);
 }
开发者ID:nyfagel,项目名称:klubb,代码行数:62,代码来源:home.php

示例12: button_group

 function button_group($data = array(), $class = '')
 {
     $class = $class != '' ? $class . ' ' : $class;
     if (!function_exists('ul')) {
         // The HTML Helper ul function is required, make the user load the helper.
         return "This Helper requires the html helper to be loaded!";
     }
     $bg = ul($data, array('class' => $class . 'button-group'));
     return $bg;
 }
开发者ID:nyfagel,项目名称:codeigniter-extensions,代码行数:10,代码来源:foundation_helper.php

示例13: menu

 function menu()
 {
     $thtml = '<b>Seleccione m&eacute;todo para generar los habladores</b>';
     $html[] = anchor('inventario/etiqueta_sinv/num_compra', 'Por n&uacute;mero compra') . ': generar habladores con todos los productos pertenecientes a una compra';
     $html[] = anchor('inventario/etiqueta_sinv/lee_barras', 'Por c&oacute;digo de barras') . ': permite generar habladores por productos seleccionados';
     $html[] = anchor('inventario/etiqueta_sinv/filteredgrid', 'Por filtro de productos') . ': permite generar los habladores filtrandolos por cacter&iacute;sticas comunes';
     $data['title'] = '<h1>Men&uacute; de Habladores</h1>';
     $data['content'] = $thtml . ul($html) . '<p style="font-size:0.5em;text-align:center">Formato: <b>' . $this->formato . '</b></p>';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:10,代码来源:etiqueta_sinv.php

示例14: index

 function index()
 {
     $this->datasis->modulo_id('923', 1);
     $list[] = anchor('sincro/notifica/sms', 'Mensajes SMS');
     $list[] = anchor('sincro/notifica/email', 'E-Mail');
     $attributes = array('class' => 'boldlist', 'id' => 'mylist');
     $out = ul($list, $attributes);
     $data['content'] = $out;
     $data['title'] = '<h1>Env&iacute;os de mensajes</h1>';
     $data['head'] = '';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:12,代码来源:notifica.php

示例15: index

 function index()
 {
     $list = array();
     $list[] = anchor('doc/modulos', 'Modulos documentados');
     $list[] = anchor('doc/tablas', 'Tablas documentadas');
     $attributes = array('class' => 'boldlist', 'id' => 'mylist');
     $out = ul($list, $attributes);
     $data['content'] = $out;
     $data["head"] = script("jquery.pack.js") . script("jquery.treeview.pack.js") . $this->rapyd->get_head() . style('jquery.treeview.css');
     $data['title'] = '<h1>Documentaci&oacute;n</h1>';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:12,代码来源:docu.php


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