/**
 		@brief		Open the tag.
 		@since		2015-12-27 14:10:46
 	**/
 public function open_tag()
 {
     $this->css_class('nav-tab');
     if ($this->current) {
         $this->css_class('nav-tab-active');
     }
     $this->set_attribute('href', $this->url);
     $this->title($this->title);
     return parent::open_tag();
 }
Exemple #2
0
 protected static function __build_tab__(){
     if (empty(self::$__par['tab-query'])) { return; }
     $hdn = self::$form->add(new hidden_box('osy[tid]'));
     $sql = env::ReplaceVariable(self::$__par['tab-query']);
     $rs  = env::$dba->exec_query(env::ReplaceVariable($sql),null,'NUM');
     $tab = new tab('tabs');
     
     $tab->att('style','border-top: 1px solid white; padding-top: 3px;');
     foreach($rs as $i => $rec)
     {
         if ((empty($_REQUEST['osy']['tid']) && empty($i)) || $_REQUEST['osy']['tid'] == $rec[0])
         {
             $tab->att('tabsel',$i);
             $hdn->value = $_REQUEST['osy']['tid'] = $rec[0];
             //self::$__bod = new addressbook('data-view');
             self::$__bod = new oaddressbook('data-view',env::$dbo,'',$_REQUEST['pag']);
             self::$__bod->att('filter_id',$rec[0]);
             self::$__bod->add_filter('_tab',$rec[0]);
             $tab->put($rec[1],self::$__bod,$i*10,10);
         } 
          else
         {
             $tab->put($rec[1],'<div style="text-align: center; margin-top: 100px;" filter_id="'.$rec[0].'">Data loading.... Please wait</div>',$i*10,10);
         }
     }
     self::$form->put($tab,'','',100,10);
 }
Exemple #3
0
<?php

if (!isset($_GET['class'])) {
    $_GET['class'] = 1;
}
if ($_GET['class'] == 1) {
    require_once "Ctab.php";
    $tab = [56, 18, 40, 2, 12, 60];
    $tri = new tab();
    $tri->set_tab($tab);
    var_dump($tri->tri("decroissant"));
} elseif ($_GET['class'] == 2) {
    require_once 'Cpass.php';
    $pass = new pass();
    $pass->set_digit("8");
    echo $pass->genere();
} elseif ($_GET['class'] == 3) {
    require_once 'Csalarie.php';
    $info = [1, "ostalier", "alexis", 1000];
    $salarie1 = new salarie($info);
    echo $salarie1->CalculerSalaireNet() . '</br>';
    echo $salarie1->cotisation();
}