24 lines
548 B
PHP
24 lines
548 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/config.php");
|
||
|
|
|
||
|
|
$data = json_decode(file_get_contents("php://input"));
|
||
|
|
|
||
|
|
$selector = '';
|
||
|
|
if(isset($data->selector)){
|
||
|
|
$selector = $data->selector;
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
<select id="<?=$selector?>" class="ms_new_blocks" multiple="">
|
||
|
|
<?php
|
||
|
|
$sql_blocks = "SELECT `id`, `name` FROM `blocks` order by name";
|
||
|
|
$q_blocks = mysql_query($sql_blocks);
|
||
|
|
while($r_blocks = mysql_fetch_assoc($q_blocks)){
|
||
|
|
?>
|
||
|
|
<option value="<?=$r_blocks['id']?>"><?=$r_blocks['name']?></option>
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
</select>
|