示例#1
0
    		</tr>
        	<tr>
            	<td class="label">Denumire: </td>
                <td><input type="text" name="Denumire" maxlength="30" value="<?php 
if (isset($Denumire)) {
    echo htmlentities($Denumire);
}
?>
" /></td>
            </tr>
             <tr>
            	<td class="label">Zona:</td>
            	<td>
            		<select name='idZona'>
            		<?php 
$zonaList = Zona::find_all();
foreach ($zonaList as $zona) {
    $selected = isset($idZona) && $idZona == $zona->id ? " selected " : "";
    echo "<option value='" . $zona->id . "'" . $selected . ">" . $zona->Denumire . "</option>";
}
?>
            		</select>
            	</td>
            </tr>
            <tr>
            	<td class="label">Dezactivat: </td>
                <td><input type="checkbox" name="Dezactivat" value="1"<?php 
if ($cartier->Dezactivat == 1) {
    echo "checked=\"checked\"";
}
?>
示例#2
0
            }
        }
        echo "</td></tr></table>";
        echo "</div>";
        echo "</td></tr>";
    }
}
?>
		</table>
		
	</div>

<script type="text/javascript"> 

<?php 
$zonalist = Zona::find_all();
if (!empty($zonalist)) {
    foreach ($zonalist as $zona) {
        echo "hide(\"cartiereZona" . $zona->id . "\");";
    }
}
$sql = "SELECT * FROM Cartier WHERE Dezactivat='0' ORDER BY Denumire";
$cartierList = Cartier::find_by_sql($sql);
if (!empty($cartierList)) {
    foreach ($cartierList as $cartier) {
        echo "hide(\"zoneCartier" . $cartier->id . "\");";
    }
}
?>
	hide("zoneTree");
//console.log($('#zoneTree table').find('input[type="checkbox"][onClick^="checkZone"]').eq(0));
示例#3
0
        	<tr>
            	<td class="label">Denumire:</td>
                <td><input type="text" name="Denumire" maxlength="30" value="<?php 
if (isset($Denumire)) {
    echo htmlentities($Denumire);
}
?>
" /></td>
            </tr>
            <tr>
            	<td class="label">Zona:</td>
            	<td>
            		<select name='idZona'>
            			<option value="">alegeti ...</option>
            		<?php 
$cartierList = Zona::find_all();
foreach ($cartierList as $cartier) {
    $selected = isset($idZona) && $idZona == $cartier->id ? " selected " : "";
    echo "<option value='" . $cartier->id . "'" . $selected . ">" . $cartier->Denumire . "</option>";
}
?>
            		</select>
            	</td>
            </tr>
		</table>
		</div>
		<div id="butoane" class="butoane">
			<input type="button" name="inapoi" value="Inapoi" onclick="back()" />
			<input type="submit" name="submit" value="Adauga" />
		</div>
</form>