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


PHP insertElement函数代码示例

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


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

示例1: GetHTML

 function GetHTML()
 {
     $HTML = "";
     foreach ($this->Buttons as $Button) {
         if ($Button['icon']) {
             $Value = '<i class="fa ' . $Button['icon'] . '"></i> ';
         } else {
             $Value = $Button['title'];
         }
         $NewHTML = insertElement('button', $Button['id'], $Value, $Button['class'], $Button['extra']);
         if ($Button['link']) {
             $HTML .= '<a href="' . $Button['link'] . '">' . $NewHTML . '</a>';
         } else {
             $HTML .= $NewHTML;
         }
     }
     return $HTML;
 }
开发者ID:javzero,项目名称:admin,代码行数:18,代码来源:class.headbutton.php

示例2: insertElement

// 6
// Изход:
// 1 3 5 6 7 9 11 45
$arr = [1, 3, 5, 7, 9, 11, 45];
$n = 2;
function insertElement($arr, $n)
{
    $len = count($arr);
    $arr1 = [];
    $flag = true;
    if ($flag && $arr[0] >= $n) {
        array_push($arr1, $n);
        $flag = false;
    }
    array_push($arr1, $arr[0]);
    for ($i = 1; $i < $len; $i++) {
        if ($arr[$i - 1] < $n && $arr[$i] > $n && $flag) {
            array_push($arr1, $n);
            $i--;
            $flag = false;
            continue;
        }
        array_push($arr1, $arr[$i]);
    }
    if ($flag && $arr1[$len - 1] <= $n) {
        array_push($arr1, $n);
    }
    return $arr1;
}
print_r(insertElement($arr, $n));
开发者ID:Dragomir89,项目名称:ittalents_homeworks,代码行数:30,代码来源:task04.php

示例3: scanPHP

function scanPHP(&$paths, $db, $printStatus = false)
{
    foreach ($paths as $key => $value) {
        if ($value['ext'] == 'php') {
            $path = $value['path'];
            if (insertFile($db, $path)) {
                cleanElement($db, $path);
                if ($printStatus) {
                    echo "SCAN " . $path . PHP_EOL;
                }
                $path_parts = pathinfo($path);
                insertElement($db, $path, $path_parts['filename'], $path_parts['extension'], "", 'file', 0);
                $content = file_get_contents($path);
                $tokens = token_get_all($content);
                /*if($path  == '/var/www/src/grep/test.php')
                       	{
                        	echo "<pre>";
                        	var_dump($tokens);
                			echo "</pre>";
                		}*/
                $tree = array();
                scanTree($tree, $tokens, 0);
                /*if($path  == '/var/www/src/grep/test.php')
                       	{
                			echo "<pre>";
                        	var_dump($tree);
                			echo "</pre>";
                		}*/
                saveTree($tree, $tokens, $path, $db);
            } else {
                if ($printStatus) {
                    echo "SKIP " . $path . PHP_EOL;
                }
            }
        }
    }
}
开发者ID:pekand,项目名称:grep,代码行数:37,代码来源:analyzer.php

示例4: insertElement

echo insertElement('select', 'parent', '', 'formNewItem', 'tabindex="3"', $DB->fetchAssoc('menu', 'menu_id,title', "", "title"), '0', 'Men&uacute; Principal');
?>
              </div>
            </div>
            <div class="col-md-6 form-group animated bounceInRight">
              <div class="form-group">
                <?php 
echo insertElement('select', 'status', '', 'formNewItem', 'tabindex="4"', $Status, '', '', 'A');
?>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-6 form-group animated bounceInLeft">
              <?php 
echo insertElement('text', 'position', '', 'form-first-name formNewItem', 'tabindex="5" placeholder="Posici&oacute;n"');
?>
            </div>
            <div class="col-md-6 form-group animated bounceInRight menuSelectIcon">
              <button type="button" class="btn mainbtn" data-toggle="modal" data-target="#myModal">Agregar &Iacute;cono</button>
              <?php 
// echo insertElement('text','icon','','form-first-name formNewItem','tabindex="6" placeholder="&Iacute;cono"');
?>
              <span>&Iacute;cono Actual: <i class="fa fa-bars" aria-hidden="true"></i></span>
            </div>
          </div>
        </div>
      </div>
      <!--  Add Img & Done Button Div  -->
      <div class="container centrarbtn animated fadeInUp donediv">
        <div class="form-group">
开发者ID:javzero,项目名称:admin,代码行数:31,代码来源:new.php

示例5: Description

              <div class="circleInput Hidden animated fadeIn"><input name="color" type="color" value="#8551d9" /></div>
              <div class=""><button type="button" name="button" class="Hidden DelSelColors btn mainbtnred delColBtn"><i class="fa fa-trash-o"></i></button></div>
              <div class="ColorSelect circle circleAddItem" style="background-color: #fff"></div>
              <div class="ColorSelect circle circleAddItem" style="background-color: #c17996"></div>
              <div class="ColorSelect circle circleAddItem" style="background-color: #768754"></div>
              <div class="ColorSelect circle circleAddItem" style="background-color: #5643a0"></div>
              <div class="ColorSelector colorPalette" name="color" type="color"><img src="../../../skin/images/body/icons/colorpalette.jpg" alt=""/></div>
            </div>
          </div>
        </div>
        <!-- Description & To Select Image Link -->
        <!-- Description (Character counter) -->
        <div class="col-md-6 form-group addItemDescription">
          <form class="form-group">
            <?php 
echo insertElement('textarea', 'description', $Data['description'], 'form-controlitems textareaitems text-center', 'placeholder="Descripción" rows="4" maxlength="150"');
?>
            <div class="remchar"><p> Caracteres restantes: </p></div>
            <div class="indicator-wrapper">
              <div class="indicator"><span class="current-length">150</span></div>
            </div>
          </form>
        </div>
        <!-- /Description (Character counter) -->
        <!-- Choose Img -->
        <div class="col-md-6 col-sm-12 imgSelector">
          <div class="imgSelectorInner">
            <img src="../../../skin/images/products/cod1.jpg" class="img-responsive">
            <div class="imgSelectorContent">
              <div id="SelectImg">
                <i class="fa fa-picture-o"></i><br>
开发者ID:javzero,项目名称:admin,代码行数:31,代码来源:inc.multipleImgForm.php

示例6: insertElement



      <!-- IMAGES -->
      <!-- Actual Image -->
      <div class="row imagesMain">
        <div class="col-lg-3 col-md-12 col-sm-6 col-xs-12">
          <div class="imagesContainer">
            <h4 class="subTitleB"><i class="fa fa-picture-o"></i> Im&aacute;gen Actual</h4>
            <div class="flex-allCenter imgSelector">
              <div class="imgSelectorInner">
                <img src="<?php 
echo $Admin->DefaultImg;
?>
" class="img-responsive MainImg animated">
                <?php 
echo insertElement('file', 'image', '', 'Hidden');
?>
                <div class="imgSelectorContent">
                  <div id="SelectImg">
                    <i class="fa fa-upload"></i><br>
                   <p>Cargar Nueva Im&aacute;gen</p>
                  </div>
                </div>
              </div>
            </div>
            <div class="text-bottom">
              <p><i class="fa fa-upload" aria-hidden="true"></i>
              Haga Click sobre la im&aacute;gen </br> para cargar una desde su dispositivo</p>
            </div>
          </div>
        </div><!-- /Actual Image -->
开发者ID:javzero,项目名称:admin,代码行数:29,代码来源:new.php

示例7: insertElement

  <?php 
echo insertElement("hidden", "action", 'update');
?>
  <?php 
echo insertElement("hidden", "id", $ID);
?>
  <div class="box animated fadeIn">
    <div class="box-header flex-justify-center">
      <div class="col-lg-8 col-sm-12">
        <div class="innerContainer">
          <h4 class="subTitleB"><i class="fa fa-plus-circle"></i> Complete los campos para agregar un nuevo pa&iacute;s</h4>
            <div class="row form-group inline-form-custom-2">
              <div class="col-xs-12 col-sm-6 inner">
                <label>T&iacute;tulo</label>
                <?php 
echo insertElement('text', 'title', $Data['title'], 'form-control', 'placeholder="Ingrese un T&iacute;tulo" validateEmpty="Ingrese un t&iacute;tulo." validateFromFile="../../library/processes/proc.common.php///El t&iacute;tulo ya existe///action:=validate///actualtitle:=' . $Data['title'] . '///object:=GeolocationCountry"');
?>
              </div>
            </div><!-- inline-form -->
            <hr>
            <div class="txC">
              <button type="button" class="btn btn-success btnGreen" id="BtnCreate"><i class="fa fa-check"></i> Editar Pa&iacute;s</button>
              <button type="button" class="btn btn-error btnRed" id="BtnCancel"><i class="fa fa-times"></i> Cancelar</button>
            </div>
        </div>
      </div>
    </div>
  </div>

<?php 
include '../../includes/inc.bottom.php';
开发者ID:javzero,项目名称:admin,代码行数:31,代码来源:edit.php

示例8: InsertSearchField

 protected function InsertSearchField()
 {
     return '<!-- Title -->
       <div class="input-group">
         <span class="input-group-addon order-arrows sort-activated" order="title" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'title', '', 'form-control', 'placeholder="T&iacute;tulo"') . '
       </div>
       <!-- Group -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="profile" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'profile', '', 'form-control', '', $this->fetchAssoc('admin_profile', 'profile_id,title', "company_id=" . $_SESSION['company_id'] . " AND status='A'", "title"), '', 'Perfil') . '
       </div>';
 }
开发者ID:javzero,项目名称:admin,代码行数:13,代码来源:class.groupdata.php

示例9: GroupTree

 public function GroupTree($ProfileID = 0, $AdminID = 0)
 {
     $HTML = '<div class="form-group checkboxDiv"><div class="checkboxTitle"><h5>Grupos Asociados</h5></div><ul>';
     if ($ProfileID != 0) {
         $this->AdminID = $AdminID;
         $CheckedGroups = $this->GetCheckedGroups();
         $Groups = $this->fetchAssoc('admin_group', '*', "group_id IN (SELECT group_id FROM relation_group_profile WHERE profile_id = " . $ProfileID . ")", "title");
         foreach ($Groups as $Group) {
             if ($CheckedGroups && in_array($Group['group_id'], $CheckedGroups)) {
                 $Checked = ' checked="checked" ';
             } else {
                 $Checked = '';
             }
             $HTML .= '<li class="treeLv1">' . insertElement('checkbox', 'group' . $Group['group_id'], $Group['group_id'], 'checkbox-custom GroupCheckbox CheckBox', 'value="' . $Group['group_id'] . '"' . $Checked) . '<label class="checkbox-custom-label" for="group' . $Group['group_id'] . '"> <i class="fa fa-users"></i> ' . $Group['title'] . '</label></li>';
         }
     } else {
         $HTML .= '<li class="treeLv1">No hay grupos asociados a este perfil<li>';
     }
     return $HTML . '</ul></div>';
 }
开发者ID:javzero,项目名称:admin,代码行数:20,代码来源:class.groupdata.php

示例10: InsertSearchResults

    public function InsertSearchResults()
    {
        if ($_POST['view_type'] == 'grid') {
            $ListClass = 'Hidden';
        } else {
            $GridClass = 'Hidden';
        }
        return '<div class="contentContainer txC" id="SearchResult" object="' . get_class($this) . '"><!-- List Container -->
			        <div class="GridView row horizontal-list flex-justify-center GridElement ' . $GridClass . ' animated fadeIn">
			          <ul>
			            ' . $this->MakeGrid() . '
			          </ul>
			        </div><!-- /.horizontal-list -->
			        <div class="row ListView ListElement animated fadeIn ' . $ListClass . '">
			          <div class="container-fluid">
			            ' . $this->MakeList() . '
			          </div><!-- container-fluid -->
			        </div><!-- row -->
			        ' . insertElement('hidden', 'totalregs', $this->GetTotalRegs()) . '
			      </div><!-- /Content Container -->';
    }
开发者ID:javzero,项目名称:admin,代码行数:21,代码来源:class.database.php

示例11: InsertSearchField

 protected function InsertSearchField()
 {
     return '<!-- Name -->
       <div class="input-group">
         <span class="input-group-addon order-arrows sort-activated" order="name" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'name', '', 'form-control', 'placeholder="Nombre"') . '
       </div>
       <!-- Corporate Name -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="corporate_name" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'corporate_name', '', 'form-control', 'placeholder="Raz&oacute;n Social"') . '
       </div>
       <!-- Address -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="address" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'address', '', 'form-control', 'placeholder="Direcci&oacute;n"') . '
       </div>
       <!-- Phone -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="phone" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'phone', '', 'form-control', 'placeholder="Tel&eacute;fono"') . '
       </div>
       <!-- Website -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="website" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'website', '', 'form-control', 'placeholder="Sitio Web"') . '
       </div>
       <!-- CUIT -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="cuit" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'cuit', '', 'form-control', 'placeholder="CUIT"') . '
       </div>
       <!-- Agent -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="agent_name" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'agent_name', '', 'form-control', 'placeholder="Responsable"') . '
       </div>';
 }
开发者ID:javzero,项目名称:admin,代码行数:38,代码来源:class.company.php

示例12: FillTree

 public function FillTree($Parent = 0, $Level = 1)
 {
     $CheckedMenues = $this->GetCheckedMenues();
     $Menues = $this->fetchAssoc('menu', '*', "parent_id = " . $Parent . " AND status <> 'I'", "position");
     $Display = in_array($Parent, $CheckedMenues) ? '' : ' style="display:none" ';
     $Parents = $this->GetParents();
     $HTML = $Parent == 0 ? '<ul id="parent' . $Parent . '">' : '<ul ' . $Display . ' id="parent' . $Parent . '">';
     $Level = $Level > 3 ? 1 : $Level;
     foreach ($Menues as $Menu) {
         $IsParent = in_array($Menu['menu_id'], $Parents);
         $Arrow = $IsParent ? '<i class="fa fa-caret-down" aria-hidden="true"></i>' : '';
         if (in_array($Menu['menu_id'], $CheckedMenues)) {
             $Checked = ' checked="checked" ';
             $Disabled = '';
         } else {
             $Disabled = $Parent != 0 && !in_array($Parent, $CheckedMenues) ? ' disabled="disabled" ' : '';
             $Checked = '';
         }
         //$HTML		.= '<li class="treeLv1">'.insertElement('checkbox','menu'.$Menu['menu_id'],$Menu['menu_id'],'CheckBox TreeCheckbox checkbox-custom','value="'.$Menu['menu_id'].'"'.$Disabled.$Checked).'<label class="checkbox-custom-label" for="menu'.$Menu['menu_id'].'"></label><span id="menu'.$Menu['menu_id'].'" '.$Arrow.' class="TreeElement"> '.$Menu['title'].'</span></li>';
         $HTML .= '<li class="TreeElement treeLv' . $Level . '">' . insertElement('checkbox', 'menu' . $Menu['menu_id'], $Menu['menu_id'], 'CheckBox TreeCheckbox checkbox-custom', 'value="' . $Menu['menu_id'] . '"' . $Disabled . $Checked) . '<label class="checkbox-custom-label" for="menu' . $Menu['menu_id'] . '"> <i class="fa ' . $Menu['icon'] . '"></i> ' . $Menu['title'] . '</label>' . $Arrow . '</li>';
         if ($IsParent) {
             $HTML .= $this->FillTree($Menu['menu_id'], $Level + 1);
         }
     }
     return $HTML . '</ul>';
 }
开发者ID:javzero,项目名称:admin,代码行数:26,代码来源:class.menu.php

示例13: InsertSearchField

 protected function InsertSearchField()
 {
     return '<!-- First Name -->
       <div class="input-group">
         <span class="input-group-addon order-arrows sort-activated" order="first_name" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'first_name', '', 'form-control', 'placeholder="Nombre"') . '
       </div>
       <!-- Last Name -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="last_name" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'last_name', '', 'form-control', 'placeholder="Apellido"') . '
       </div>
       <!-- User -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="user" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'user', '', 'form-control', 'placeholder="Usuario"') . '
       </div>
       <!-- Email -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="email" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'email', '', 'form-control', 'placeholder="Email"') . '
       </div>
       <!-- Profile -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="profile" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'profile', '', 'form-control', '', $this->fetchAssoc('admin_profile', 'profile_id,title', "company_id=" . $_SESSION['company_id'] . " AND status='A' AND profile_id >= " . $_SESSION['profile_id']), '', 'Perfil') . '
       </div>
       <!-- Group -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="group" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'group', '', 'form-control', '', $this->fetchAssoc('admin_group', 'group_id,title', "company_id=" . $_SESSION['company_id'] . " AND status='A' AND group_id IN (SELECT group_id FROM relation_group_profile WHERE profile_id >= " . $_SESSION['profile_id'] . ")", "title"), '', 'Grupo') . '
       </div>';
 }
开发者ID:javzero,项目名称:admin,代码行数:33,代码来源:class.admindata.php

示例14: InsertSearchField

 protected function InsertSearchField()
 {
     return '<!-- Title -->
       <div class="input-group">
         <span class="input-group-addon order-arrows sort-activated" order="title" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'title', '', 'form-control', 'placeholder="T&iacute;tulo"') . '
       </div>';
 }
开发者ID:javzero,项目名称:admin,代码行数:8,代码来源:class.geolocation.country.php

示例15: InsertSearchField

 protected function InsertSearchField()
 {
     $Parents = $this->GetParents();
     $Parents = $this->fetchAssoc('menu', 'menu_id,title', "status<>'I' AND menu_id IN (" . implode(",", $Parents) . ")");
     $Parents[] = array("menu_id" => "0", "title" => "Men&uacute; Principal");
     return '<!-- Title -->
       <div class="input-group">
         <span class="input-group-addon order-arrows sort-activated" order="title" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'title', '', 'form-control', 'placeholder="T&iacute;tulo"') . '
       </div>
       <!-- Link -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="link" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('text', 'link', '', 'form-control', 'placeholder="Link"') . '
       </div>
       <!-- Parent -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="parent" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'parent', '', 'form-control', '', $Parent, '', 'Ubicaci&oacute;n') . '
       </div>
       <!-- Public -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="public" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'public', '', 'form-control', '', array("N" => "Privado", "Y" => "P&uacute;blico"), '', "Privacidad") . '
       </div>
       <!-- Type -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="status" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'view_status', '', 'form-control', '', array("A" => "Visible", "O" => "Oculto"), '', "Visibilidad") . '
       </div>
       <!-- Profile -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="profile" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'profile', '', 'form-control', '', $this->fetchAssoc('admin_profile', 'profile_id,title', "company_id=" . $_SESSION['company_id'] . " AND status='A'"), '', 'Perfil') . '
       </div>
       <!-- Group -->
       <div class="input-group">
         <span class="input-group-addon order-arrows" order="group" mode="asc"><i class="fa fa-sort-alpha-asc"></i></span>
         ' . insertElement('select', 'group', '', 'form-control', '', $this->fetchAssoc('admin_group', 'group_id,title', "company_id=" . $_SESSION['company_id'] . " AND status='A'", "title"), '', 'Grupo') . '
       </div>';
 }
开发者ID:javzero,项目名称:admin,代码行数:41,代码来源:class.menu.php


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