示例#1
0
 public function gerarStringArquivo($lang)
 {
     $stringRetorno = '<?php ';
     $stringRetorno .= '$lang = array(';
     $array = self::listar(" lang='" . $lang . "'");
     foreach ($array as $key => $a) {
         $item = new ItemTraducao();
         $item->selecionarPorId($a->fkItemTraducao);
         $itemTraducao = $stringRetorno .= '"' . $item->nome . '"=>"' . $a->valor . '"';
         $stringRetorno .= ',';
     }
     $stringRetorno = substr($stringRetorno, 0, -1);
     $stringRetorno .= '); ';
     $stringRetorno .= 'return $lang;';
     $stringRetorno .= '?>';
     return $stringRetorno;
 }
示例#2
0
    ?>
				  <table class="table table-striped table-bordered">
					  <thead>
						  <tr>
							  <th width="1%" >ID</th>
							  <th width="1%" >Lingua</th>
							  <th width="1%" >Tipo</th>
							  <th width="80%" >Nome</th>
							  <th width="20%" class="td-actions"></th>
						  </tr>
					  </thead>
					  <tbody>
					  <?php 
    foreach ($listaNL as $i) {
        $item = new ItemTraducao();
        $item->selecionarPorId($i->fkItemTraducao);
        ?>
							  <tr>
								  <td><?php 
        echo $i->id;
        ?>
</td>
								  <td><?php 
        echo $i->lang;
        ?>
</td>
								  <td><?php 
        echo $item->nome;
        ?>
</td>
								  <td><?php 
 public static function excluir()
 {
     $item = new ItemTraducao();
     $item->selecionarPorId($_POST['id']);
     $item->excluir();
 }