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


PHP div函数代码示例

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


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

示例1: 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

示例2: plug_connectors

function plug_connectors($p, $o)
{
    $rid = 'plg' . randid();
    $bt = connectors_menu($p, $o, $rid);
    $ret = connectors_j($p, $o);
    return $bt . div(atd($rid), $ret);
}
开发者ID:philum,项目名称:cms,代码行数:7,代码来源:connectors.php

示例3: slide

 static function slide($r, $p, $rid)
 {
     $j = $rid . '_class___toposlides_j_';
     $v = $r[$p];
     if ($v[0]) {
         $bt1 = lj('', $j . $v[0] . '_' . $rid . '_inp', pictxt('left', $v[0])) . ' ';
     }
     //parent
     if ($v[2]) {
         $bt3 = lj('', $j . $v[2] . '_' . $rid . '_inp', pictxt('down', $v[2])) . ' ';
     }
     //end
     foreach ($r as $ka => $va) {
         if ($va[2] == $p) {
             $bt2 = lj('', $j . $ka . '_' . $rid . '_inp', pictxt('up', $ka)) . ' ';
         }
         //begin
         if ($va[0] == $p) {
             $bt4 .= lj('', $j . $ka . '_' . $rid . '_inp', pictxt('right', $ka)) . ' ';
         }
     }
     $bt = divc('', $bt1 . $bt2 . $bt3 . $bt4 . $bt0);
     //$cell=div(atc('imgl').ats('width:36px'),$bt1.$bt2.$bt3.$bt4);
     $ret = nl2br(stripslashes_b($v[1]));
     $cell = div(ats('margin:auto;'), $ret);
     $ret = $bt . div(atc('book') . ats('display:flex; min-height:300px; width:94%;'), $cell);
     return $ret;
 }
开发者ID:philum,项目名称:cms,代码行数:28,代码来源:toposlides.php

示例4: mareaRojaColumnaDesembarcoResultados

function mareaRojaColumnaDesembarcoResultados($id)
{
    $_ci =& get_instance();
    $_ci->load->helper(array("modulo/marea_roja/permiso", "modulo/marea_roja/acta", "modulo/archivo/archivo"));
    $html = "";
    $_ci->load->model("marea_roja_desembarco_model", "_marea_roja_model");
    $_ci->load->model("marea_roja_desembarco_informe_model", "_marea_roja_desembarco_informe_model");
    $marea_roja = $_ci->_marea_roja_model->getById($id);
    if (!is_null($marea_roja)) {
        $html = div("btn-group", array("width" => "135px"));
        $html .= botonSM("Ver detalle desembarco", "btn-primary ver-marea-roja-desembarco", "fa-search", array("rel" => $marea_roja->id));
        if (permisoMareaRoja("editar")) {
            $html .= botonSM("Ingresar resultados", "btn-success editar-marea-roja", "fa-plus-square-o", array("rel" => $marea_roja->id));
        }
        if (permisoMareaRoja("validar")) {
            if ($marea_roja->bo_ingreso_resultado) {
                $html .= botonSM("Validar resultado", "btn-green validar", "fa-check-circle", array("rel" => $marea_roja->id));
            }
            if ($marea_roja->bo_validado) {
                $existe = $_ci->_marea_roja_desembarco_informe_model->getByDesembarco($marea_roja->id);
                if (is_null($existe)) {
                    $html .= botonSM("Generar informe de desembarco", "btn-info generar-informe", "fa-file-o", array("rel" => $marea_roja->id));
                } else {
                    $html .= botonSM("Ver informe de desembarco", "btn-primary ver-informe", "fa-file", array("rel" => urlArchivo($existe->id_archivo)));
                }
            }
        }
        $html .= divClose();
    }
    return $html;
}
开发者ID:CarlosAyala,项目名称:midas-codeigniter-modulo-emergencias,代码行数:31,代码来源:grilla_columna_helper.php

示例5: get_menu_item

 private function get_menu_item($menu_id)
 {
     $this->load->library('table');
     $this->load->model('menu_item');
     $content_vars = array();
     // Template da tabela
     $this->table->set_template(array('table_open' => '<table class="table table-striped table-bordered">'));
     $this->table->set_heading('Label', 'Ordem', 'Tipo', 'Link', 'Ações');
     $query = $this->menu_item->get_by_field('menu_id', $menu_id, array('field' => 'ordem', 'order' => 'asc'));
     foreach ($query->result() as $row) {
         switch ($row->tipo) {
             case 'post':
                 $link = $this->get_titulo_postagem($row->href);
                 break;
             case 'posts':
                 $link = $this->get_titulo_categoria($row->href);
                 break;
             case 'link':
                 $link = $row->href;
                 break;
             case 'funcional':
                 $link = humanize($row->href);
                 break;
             case 'submenu':
                 $link = $this->get_titulo_menu($row->href);
                 break;
         }
         $this->table->add_row($row->label, $row->ordem, humanize($row->tipo), $link, div(array('class' => 'btn-group btn-group-sm')) . anchor('admin/menuitens/edit/' . $row->id, glyphicon('edit'), array('class' => 'btn btn-default')) . '<button class="btn btn-default" onClick="return confirmar(\'' . site_url('admin/menuitens/delete/' . $row->id) . '\');">' . glyphicon('trash') . '</button>' . div(null, true));
     }
     $content_vars['menu_id'] = $menu_id;
     $content_vars['listagem'] = $this->table->generate();
     return $this->load->view('menuitens/index', $content_vars, TRUE);
 }
开发者ID:GFhillip,项目名称:wpanel,代码行数:33,代码来源:menus.php

示例6: __construct

 function __construct(Thread $thread)
 {
     parent::__construct($thread->getBoard());
     $topLinks = div('', 'topLinks navLinks')->append('[' . a('Home', '/index') . ']')->append(' [' . a('Return', '/' . $this->board->getName() . '/') . ']');
     if (!$thread->getBoard()->isSwfBoard()) {
         $topLinks->append(' [' . a('Catalog', '/' . $this->board->getName() . '/catalog') . ']');
     }
     if (!$thread->getBoard()->isArchive() && $thread->isActive()) {
         if ($thread->isClosed()) {
             $this->appendToBody(el('h2', 'Thread is closed.'));
         } else {
             if (!isset($_SESSION['captcha'])) {
                 $_SESSION['captcha'] = rand(100000, 999999);
             }
             $this->appendToBody(Site::parseHtmlFragment('postForm.html', ['_board_', '_resto_', '_password_'], [$thread->getBoard()->getName(), $thread->getThreadId(), 'password']));
         }
     }
     $this->appendToBody($topLinks);
     $thread->loadAll();
     $dur = secsToDHMS($thread->getPost($thread->getPosts() - 1)->getTime() - $thread->getPost(0)->getTime());
     $board = div('', 'board');
     if ($thread->getBoard()->isArchive()) {
         $threadStats = Site::parseHtmlFragment("threadStats.html", ["__threadid__", "__posts__", "__posts_actual__", "__images__", "__images_actual__", "__lifetime__", "__deleted__", "<!--4chanLink-->", "<!--tag-->"], [$thread->getThreadId(), $thread->getChanPosts(), $thread->getPosts() - 1, $thread->getChanImages(), $thread->getImages() - 1, "{$dur[0]}d {$dur[1]}h {$dur[2]}m {$dur[3]}s", $thread->getDeleted(), $thread->isActive() ? "<a target='_blank' href='//boards.4chan.org/{$this->board->getName()}/thread/{$thread->getThreadId()}'>View on 4chan</a>" : "Thread is dead.", $thread->getTag() != null ? "<br>Tagged as: " . $thread->getTag() : ""]);
         $board->append($threadStats);
     } else {
         $board->append('<hr>');
     }
     $this->appendToBody($board->append(div($thread->displayThread(), 'thread')));
     $bottomLinks = $topLinks;
     $this->appendToBody("<hr>" . $bottomLinks);
 }
开发者ID:bstats,项目名称:b-stats,代码行数:31,代码来源:ThreadView.php

示例7: book_cover

function book_cover($t)
{
    $t = str_replace(' ', "\n", $t);
    $w = $_SESSION['prma']['content'];
    $t = call_plug('', 'popup', 'book', ajx($_SESSION['book']) . '_' . $w, $t);
    //
    return div(' class="book" style="background-color:black; padding:10px; width:220px;"', divs('background-color:#222; border:1px solid #fff; padding:5px; margin:auto; color:white; font-size:16px; text-align:center; text-decoration:none;', $t));
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:9,代码来源:book.php

示例8: to_html_link

 public function to_html_link(\System\Template\Renderer $ren, $short_name = true)
 {
     if ($short_name && mb_strlen($this->name_full) > 32) {
         $long_name = substr($this->name_full, 0, 32) . '...';
     } else {
         $long_name = $this->name_full;
     }
     return div('name', array($ren->link_for('team', $this->name, array("args" => array($this), "class" => 'short')), span('sep', ' - '), $ren->link_for('team', $long_name, array("args" => array($this), "class" => 'full'))));
 }
开发者ID:just-paja,项目名称:improvanywhere-api,代码行数:9,代码来源:team.php

示例9: fav_render_cols

function fav_render_cols($r)
{
    req('spe');
    if ($r) {
        foreach ($r as $id => $v) {
            $ret .= fav_art($id);
        }
    }
    return div(atc('cols') . ats('width:640px;'), $ret);
}
开发者ID:philum,项目名称:cms,代码行数:10,代码来源:favs.php

示例10: __construct

 public function __construct(Board $board)
 {
     parent::__construct("/{$board->getName()}/ - {$board->getLongName()}", "", $board->getPrivilege());
     $boardBanner = div("", "boardBanner centertext")->append(div("/{$board->getName()}/ - {$board->getLongName()}", "boardTitle"));
     if ($board->isArchive()) {
         $boardBanner->append(a("View this board on 4chan", '//boards.4chan.org/' . $board->getName()));
     }
     $this->appendToBody("<hr>" . $boardBanner . "<hr>");
     $this->board = $board;
 }
开发者ID:bstats,项目名称:b-stats,代码行数:10,代码来源:BoardPage.php

示例11: initNavbar

 private function initNavbar()
 {
     $this->navbar = div('', 'navbar');
     foreach (Config::getCfg('navlinks') as $name => $link) {
         $this->navbar->append(a(span("&nbsp;{$name}&nbsp;", 'navelement'), $link));
     }
     $stylelist = el('ul');
     foreach (Config::getCfg("styles") as $name => $css) {
         $stylelist->append(el('li', a("&nbsp;{$name}&nbsp;", "javascript:")->set("onclick", "StyleSwitcher.switchTo('{$name}')")->set("class", 'navelement')->set("title", $name)));
     }
     $this->navbar->append(el('ul', el('li', '[Page Style]' . $stylelist, ['class' => 'navelement']), ['class' => 'stylemenu']));
 }
开发者ID:bstats,项目名称:b-stats,代码行数:12,代码来源:Page.php

示例12: date_diff_to_text

function date_diff_to_text($seconds)
{
    $minutes = div($seconds, 60);
    $seconds = $seconds % 60;
    if ($minutes < 60) {
        return sprintf("%02d:%02d", $minutes, $seconds);
    } else {
        $hours = div($minutes, 60);
        $minutes = $minutes % 60;
        return sprintf("%02d:%02d:%02d", $hours, $minutes, $seconds);
    }
}
开发者ID:abhijitroy07,项目名称:mibew,代码行数:12,代码来源:datetime.php

示例13: index

 public function index()
 {
     $this->load->library('table');
     $this->table->set_template(array('table_open' => '<table id="grid" class="table table-striped">'));
     $this->table->set_heading('Id', 'Titulo', 'Descricao', 'Status', 'Ações');
     $query = $this->video->get_list()->result();
     foreach ($query as $row) {
         $this->table->add_row($row->id, $row->titulo, $row->descricao, status_post($row->status), div(array('class' => 'btn-group btn-group-sm')) . anchor('admin/videos/edit/' . $row->id, glyphicon('edit'), array('class' => 'btn btn-default')) . '<button class="btn btn-default" onClick="return confirmar(\'' . site_url('admin/videos/delete/' . $row->id) . '\');">' . glyphicon('trash') . '</button>' . div(null, true));
     }
     $this->content_vars['listagem'] = $this->table->generate();
     $this->wpanel->load_view('videos/index', $this->content_vars);
 }
开发者ID:GFhillip,项目名称:wpanel,代码行数:12,代码来源:videos.php

示例14: jalali_week_day

/**
 * 
 * @deprecated since 5.0.0
 */
function jalali_week_day($j_y, $j_m, $j_d)
{
    global $j_days_in_month;
    $jy = $j_y - 979;
    $jm = $j_m - 1;
    $jd = $j_d - 1;
    $j_day_no = 365 * $jy + div($jy, 33) * 8 + div($jy % 33 + 3, 4);
    for ($i = 0; $i < $jm; ++$i) {
        $j_day_no += $j_days_in_month[$i];
    }
    $j_day_no += $jd;
    return ($j_day_no + 2) % 7 + 1;
}
开发者ID:vah7id,项目名称:wp-persian-openshift,代码行数:17,代码来源:deprecated_fns.php

示例15: demoMod

function demoMod($a, $b)
{
    echo "Demo for pair ({$a}, {$b}):\n";
    $c = $a / $b;
    $ic = idiv($a, $b);
    $d = $a % $b;
    $mc = div($a, $b);
    $md = mod($a, $b);
    echo "Standard PHP division: {$a}  / {$b} = {$c}\n";
    echo "Custom integer division: {$a} / {$b} = {$ic}\n";
    echo "Fixed integer division: {$a} / {$b} = {$mc}\n";
    echo "Standard PHP integer modulo: {$a} % {$b} = {$d}\n";
    echo "Fixed integer modulo: {$a} mod {$b} = {$md}\n\n";
}
开发者ID:anatoliyrazin,项目名称:negative_base,代码行数:14,代码来源:neg_base.php


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