Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
// 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));
Exemplo n.º 3
0
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;
                }
            }
        }
    }
}
Exemplo n.º 4
0
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">
Exemplo n.º 5
0
              <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>
Exemplo n.º 6
0

      <!-- 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 -->
Exemplo n.º 7
0
  <?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';
Exemplo n.º 8
0
 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>';
 }
Exemplo n.º 9
0
 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>';
 }
Exemplo n.º 10
0
          <input type="checkbox" name="status" id="status" data-on-text="Activo" data-off-text="Inactivo" data-size="mini" data-label-width="auto" checked>
        </div>
      </div><!-- /WindowHead -->
      <div class="container animated fadeIn additemdiv">
        <div class="col-sm-12 form-box formitems">
          <div class="row">
            <div class="col-md-3 form-group animated bounceInLeft">
            </div>
            <div class="col-md-6 form-group animated bounceInLeft">
              <?php 
echo insertElement('text', 'title', '', 'form-first-name form-controlusers text-center', 'placeholder="Nombre del perfil" tabindex="1" validateEmpty="El nombre es obligatorio." validateMinLength="3/El nombre debe contener 3 caracteres como mínimo." validateFromFile="process.php/El perfil ya existe/action:=validate"');
?>
            </div>
            <div class="col-md-3 form-group animated bounceInRight">
              <?php 
echo insertElement('file', 'image', '', 'form-first-name form-controlusers Hidden', 'placeholder="Imagen" tabindex="3"');
?>
            </div>
          </div>
          <!-- PROFILE TREE -->
          <div class="row">
            <div class="col-md-6 flex-container">

              <!-- Old image selector -->
              <!-- <div class="form-group animated bounceInBottom">
                <img src="<?php 
// echo $Profile->GetDefaultImg();
?>
" width="200" height="200" id="profileimg" />
              </div> -->
Exemplo n.º 11
0
    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 -->';
    }
Exemplo n.º 12
0
 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>';
 }
Exemplo n.º 13
0
 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>';
 }
Exemplo n.º 14
0
                      </div>
                    </div>
                    <div class="row form-group inline-form-custom">
                      <div class="col-xs-12 col-sm-6">
                        <span class="input-group">
                          <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
                          <?php 
echo insertElement('text', 'agentemail', '', 'form-control', 'tabindex="103" placeholder="Email" validateEmail="Ingrese un email v&aacute;lido."');
?>
                        </span>
                      </div>
                      <div class="col-xs-12 col-sm-6">
                        <span class="input-group">
                          <span class="input-group-addon"><i class="fa fa-phone"></i></span>
                          <?php 
echo insertElement('text', 'agentphone', '', 'form-control', 'tabindex="104" placeholder="Tel&eacute;fono"');
?>
                        </span>
                      </div>
                    </div>
                    <div class="row txC">
                      <button id="agent_add" type="button" class="Info-Card-Form-Done btn btnGreen"><i class="fa fa-check"></i> Agregar</button>
                      <button id="agent_cancel" type="button" class="Info-Card-Form-Done btn btnRed"><i class="fa fa-times"></i> Cancelar</button>
                    </div>
                  </div>
                </form>
              </div>
              <!-- New representative form -->
            </div>
          </div>
          <hr>
Exemplo n.º 15
0
        </div>
      </div>
      <!-- /WindowHead -->
      <div class="container animated fadeIn addItemDiv">
        <div class="col-md-12 form-box formitems">
          <!-- User Data -->
          <div id="newInputs">
            <div class="row">
              <div class="col-md-6 form-group animated bounceInLeft">
                <?php 
echo insertElement('text', 'title', '', 'form-first-name form-controlusers', 'placeholder="Nombre de la categoría" tabindex="1" validateEmpty="El nombre es obligatorio." validateMinLength="2/El nombre debe contener 2 caracteres como mínimo." validateFromFile="process.php/La categoría ya existe/action:=validate"');
?>
              </div>
              <div class="col-md-6 form-group animated bounceInLeft">
                <?php 
echo insertElement('select', 'parent', '', 'form-controlusers', 'tabindex="2"', $DB->fetchAssoc("category", "category_id,title", "status='A'", "title"), '0', 'Categoría Principal');
?>
              </div>
            </div>
            <!-- /User Data -->
            <!-- Single Image -->

              <!-- Choose Img -->
              <div class="col-md-12 imgSelector">
                <div class="imgSelectorInner">
                  <img src="../../../skin/images/profiles/profile48000197.jpeg">
                  <div class="imgSelectorContent">
                    <div id="SelectImg">
                      <i class="fa fa-picture-o"></i><br>
                      Cambiar Im&aacute;gen
                    </div>
Exemplo n.º 16
0
 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>';
 }
Exemplo n.º 17
0
 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>';
 }
Exemplo n.º 18
0
 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>';
 }
Exemplo n.º 19
0
 public function ProfileTree($GroupID = 0)
 {
     $CheckedProfiles = $this->GetCheckedProfiles($GroupID);
     $Profiles = $this->fetchAssoc('admin_profile', '*', "status <> 'I'", "title");
     $HTML = '<ul>';
     foreach ($Profiles as $Profile) {
         if ($CheckedProfiles && in_array($Profile['profile_id'], $CheckedProfiles)) {
             $Checked = ' checked="checked" ';
         } else {
             $Checked = '';
         }
         $HTML .= '<li>' . insertElement('checkbox', 'profile' . $Profile['profile_id'], $Profile['profile_id'], 'checkbox-custom ProfileCheckbox', 'value="' . $Profile['profile_id'] . '"' . $Checked) . '<label class="checkbox-custom-label" for="profile' . $Profile['profile_id'] . '"></label><span id="profile' . $Profile['profile_id'] . '" class=""> ' . $Profile['title'] . '</span></li>';
     }
     return $HTML . '</ul>';
 }
Exemplo n.º 20
0
         $TotalRegs = $DB->numRows('admin_group', '*', "title = '" . $Title . "' AND title<> '" . $Actual . "'");
     } else {
         $TotalRegs = $DB->numRows('admin_group', '*', "title = '" . $Title . "'");
     }
     if ($TotalRegs > 0) {
         echo $TotalRegs;
     }
     die;
     break;
     ///////////////////////////////////// FILL GROUPS /////////////////////////////////////////////////
 ///////////////////////////////////// FILL GROUPS /////////////////////////////////////////////////
 case 'fillgroups':
     $Profile = $_POST['profile'];
     $Groups = $DB->fetchAssoc('admin_group', '*', "group_id IN (SELECT group_id FROM relation_group_profile WHERE profile_id = " . $Profile . ")", "name");
     foreach ($Groups as $Group) {
         echo '<div style="width:auto;">' . insertElement('checkbox', 'group_id', $Group['group_id'], 'Arial12px BlueCyan Bold', 'tabindex="9"') . ' ' . htmlentities($Group['name']) . '</div>';
     }
     die;
     break;
     //////////////////////////////////// PAGER ////////////////////////////////////////////////////////
 //////////////////////////////////// PAGER ////////////////////////////////////////////////////////
 case 'pager':
     $Page = $_POST['page'];
     if ($Page) {
         $Pager = $_SESSION[$_POST['pagerid']];
         $Pager->SetActualPage($Page);
         if ($_SESSION['inactive_status']) {
             echo utf8_encode($Admin->MakeListInactive($Pager->CalculateRegFrom(), $Pager->GetPageRegs(), $Pager->GetWhere()));
         } else {
             echo utf8_encode($Admin->MakeList($Pager->CalculateRegFrom(), $Pager->GetPageRegs(), $Pager->GetWhere()));
         }
Exemplo n.º 21
0
                <label for="">Posici&oacute;n  </label><br>
                <?php 
echo insertElement('text', 'position', '', 'form-control', 'placeholder="Ingrese un n&uacute;mero" validateOnlyNumbers="Ingrese un n&uacute;mero."');
?>
              </div>
              <div class="col-md-12 padL0">
                <div class="col-xs-12 col-sm-4 inner">
                  <label for="">Privacidad</label><br>
                  <?php 
echo insertElement('checkbox', 'public', '', '', 'data-on-text="Privado" data-off-text="P&uacute;blico" data-size="mini" checked');
?>
                </div>
                <div class="col-xs-12 col-sm-4 inner">
                  <label for="">Visibilidad</label><br>
                  <?php 
echo insertElement('checkbox', 'status', '', '', 'data-on-text="Visible" data-off-text="Oculto" data-size="mini" checked');
?>
                </div>
                <div class="col-xs-12 col-sm-4 inner">
                  <label for="">Icono</label>
                  <div class="input-group">
                    <span class="input-group-addon cursor-pointer IconInput"><i class="fa fa-bars"></i></span>
                    <!--<input class="IconInput form-control cursor-pointer" placeholder="Seleccione un &iacute;cono" type="text">-->
                  </div>
                </div>
              </div>
            </div><!-- inline-form -->
            <hr>
            <div class="txC">
              <button type="button" class="btn btn-success btnGreen" id="BtnCreate"><i class="fa fa-plus"></i> Crear Nuevo Men&uacute;</button>
              <button type="button" class="btn btn-success btnBlue" id="BtnCreateNext"><i class="fa fa-plus"></i> Crear y Agregar Otro</button>
Exemplo n.º 22
0
$Head->setTitle($Menu->GetTitle());
$Head->setStyle('../../../vendors/daterangepicker/daterangepicker.css');
$Head->setHead();
include '../../includes/inc.top.php';
?>
  <?php 
echo insertElement("hidden", "action", 'insert');
?>
  <?php 
echo insertElement("hidden", "menues", "");
?>
  <?php 
echo insertElement("hidden", "groups", "");
?>
  <?php 
echo insertElement("hidden", "newimage", $Admin->DefaultImg);
?>


  <div class="box animated fadeIn">
    <div class="box-header flex-justify-center">
      <div class="col-md-8 col-sm-12">
        <div class="innerContainer main_form">
          <h4 class="subTitleB"><i class="fa fa-tag"></i> Nuevo Movimiento</h4>
          <div class="row form-group inline-form-custom">
            <div class="col-xs-12 col-sm-6">
              <label for="">Cliente</label>
              <select class="form-control">
                <option selected disabled>Seleccione...</option>
                <option>Cliente1</option>
                <option>Cliente2</option>
Exemplo n.º 23
0
 public function MakeMenuList($Parent = 0)
 {
     if ($Parent == 0) {
         $this->GetCheckedMenues($this->AdminID);
         $this->GetParents();
     }
     $Menues = $this->fetchAssoc('menu', '*', "parent_id = " . $Parent . " AND status <> 'I'");
     foreach ($Menues as $Menu) {
         $IsParent = in_array($Menu['menu_id'], $this->Parents);
         if (in_array($Menu['menu_id'], $this->Menues)) {
             $Hidden = '';
             $Selected = ' checked = "checked" ';
             $Arrow = $IsParent ? '<div class="Arrow ArrowLeft" id="img' . $Menu['menu_id'] . '"></div>' : "";
         } else {
             $Hidden = ' Hidden ';
             $Selected = '';
             $Arrow = $IsParent ? '<div class="Arrow ArrowDown" id="img' . $Menu['menu_id'] . '"></div>' : "";
         }
         if ($Parent != 0) {
             $Disabled = $this->IsDisabled($Menu['parent_id']);
         }
         $HTML .= '<div>' . insertElement('checkbox', 'menu', $Menu['menu_id'], 'Left Pointer MenuCheckbox Menu' . $Menu['parent_id'], $Selected . $Disabled) . '<div class="Parent Left Frutiger12px BlueCyan" id="' . $Menu['menu_id'] . '">' . $Menu['title'] . '</div>' . $Arrow . '<div class="Clear"></div></div>';
         if ($IsParent) {
             $HTML .= '<div class="ProfileChild ' . $Hidden . '" id="Child' . $Menu['menu_id'] . '" >';
             $HTML .= $this->MakeMenuList($Menu['menu_id']);
             $HTML .= "</div>";
         }
     }
     return $HTML;
 }