Example #1
0
function geraIonicView($sql, $cnx, $util)
{
    if (false) {
        $cnx = new Conexao();
    }
    $rs = $cnx->runSQL($sql);
    $virgula = '';
    $arrCampos = '';
    ?>
<textarea rows="30" cols="150" >
		<ion-view view-title="<?php 
    echo ucfirst($_GET['ed_tab_ionic']);
    ?>
">
		  <ion-content>
		  <div class="banner">
		<img src="img/banner2.png" width="400" height="180">
		</div>
		
		<div class="card">
		  <div class="item item-divider">
		    Cadastro de <?php 
    echo ucfirst($_GET['ed_tab_ionic']);
    ?>
		  </div>
		  <div  class="item item-text-wrap">
		    <div>
				<div class="list">
				<?php 
    for ($i = 0; $i < $cnx->fieldCount($rs); $i++) {
        $nome = $cnx->fieldName($rs, $i);
        ?>
					  <label class="item item-input item-floating-label">
					    <span class="input-label"><?php 
        echo ucfirst($nome);
        ?>
</span>
					    <input type="text" placeholder="<?php 
        echo ucfirst($nome);
        ?>
" ng-model="<?php 
        echo $_GET['ed_tab_ionic'] . "." . strtolower($nome);
        ?>
">
					  </label>
					<?php 
    }
    ?>
				</div>    	
		    	<button class="button button-full button-positive" ng-click="salvar()">
		  			Salvar
				</button>
		    </div>  	
		  </div>
		</div>  
		</ion-content>
		</ion-view>
		
		</textarea><?php 
}