|
|
|
@ -47,53 +47,51 @@ function orari_dirette_input($post)
|
|
|
|
|
$broadcast = term_exists('Podcast', 'category', 0);
|
|
|
|
|
$old_term = term_exists($post->post_title, 'category', $broadcast);
|
|
|
|
|
?>
|
|
|
|
|
<input type="hidden" name="taxonomy_id" value="<?php echo $old_term['term_id'] ?>" /> // non funziona dioporcolo
|
|
|
|
|
<input type="hidden" name="taxonomy_id" value="<?php echo $old_term['term_id'] ?>" />
|
|
|
|
|
<?php
|
|
|
|
|
for ($x=0;$x<7;$x++) :
|
|
|
|
|
$onair_day[$x] = isset($values['on_air_day_'.$x]) ? esc_attr($values['on_air_day_'.$x][0]) : '';
|
|
|
|
|
$onair_cadence[$x] = isset($values['on_air_cadence_'.$x]) ? esc_attr($values['on_air_cadence_'.$x][0]) : '';
|
|
|
|
|
$onair_startdate[$x] = isset($values['on_air_startdate_'.$x]) ? esc_attr($values['on_air_startdate_'.$x][0]) : '';
|
|
|
|
|
$onair_start[$x] = isset($values['on_air_start_'.$x]) ? esc_attr($values['on_air_start_'.$x][0]) : '';
|
|
|
|
|
$onair_end[$x] = isset($values['on_air_end_'.$x]) ? esc_attr($values['on_air_end_'.$x][0]) : '';
|
|
|
|
|
$broadcast[$x] = term_exists('Podcast', 'category', 0);
|
|
|
|
|
$old_term[$x] = term_exists($post->post_title, 'category', $broadcast); ?>
|
|
|
|
|
|
|
|
|
|
$onair_day = isset($values['on_air_day_'.$x]) ? esc_attr($values['on_air_day_'.$x][0]) : '';
|
|
|
|
|
$onair_cadence = isset($values['on_air_cadence_'.$x]) ? esc_attr($values['on_air_cadence_'.$x][0]) : '';
|
|
|
|
|
$onair_startdate = isset($values['on_air_startdate_'.$x]) ? esc_attr($values['on_air_startdate_'.$x][0]) : '';
|
|
|
|
|
$onair_start = isset($values['on_air_start_'.$x]) ? esc_attr($values['on_air_start_'.$x][0]) : '';
|
|
|
|
|
$onair_end = isset($values['on_air_end_'.$x]) ? esc_attr($values['on_air_end_'.$x][0]) : '';
|
|
|
|
|
?>
|
|
|
|
|
<div style='width:100%;float:left;'>
|
|
|
|
|
<h3>Diretta n. <?php echo $x+1; ?></h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<select name="on_air_day_<?php echo $x; ?>" id="on_air_day_<?php echo $x; ?>">
|
|
|
|
|
<option <?php echo ($onair_day[$x]=='') ? 'selected' : ''; ?> value="">Seleziona un giorno</option>
|
|
|
|
|
<option <?php echo ($onair_day[$x]==1) ? 'selected' : ''; ?> value="1">Lunedì</option>
|
|
|
|
|
<option <?php echo ($onair_day[$x]==2) ? 'selected' : ''; ?> value="2">Martedì</option>
|
|
|
|
|
<option <?php echo ($onair_day[$x]==3) ? 'selected' : ''; ?> value="3">Mercoledì</option>
|
|
|
|
|
<option <?php echo ($onair_day[$x]==4) ? 'selected' : ''; ?> value="4">Giovedì</option>
|
|
|
|
|
<option <?php echo ($onair_day[$x]==5) ? 'selected' : ''; ?> value="5">Venerdì</option>
|
|
|
|
|
<option <?php echo ($onair_day[$x]==6) ? 'selected' : ''; ?> value="6">Sabato</option>
|
|
|
|
|
<option <?php echo ($onair_day[$x]==7) ? 'selected' : ''; ?> value="7">Domenica</option>
|
|
|
|
|
<option <?php echo ($onair_day=='') ? 'selected' : ''; ?> value="">Seleziona un giorno</option>
|
|
|
|
|
<option <?php echo ($onair_day==1) ? 'selected' : ''; ?> value="1">Lunedì</option>
|
|
|
|
|
<option <?php echo ($onair_day==2) ? 'selected' : ''; ?> value="2">Martedì</option>
|
|
|
|
|
<option <?php echo ($onair_day==3) ? 'selected' : ''; ?> value="3">Mercoledì</option>
|
|
|
|
|
<option <?php echo ($onair_day==4) ? 'selected' : ''; ?> value="4">Giovedì</option>
|
|
|
|
|
<option <?php echo ($onair_day==5) ? 'selected' : ''; ?> value="5">Venerdì</option>
|
|
|
|
|
<option <?php echo ($onair_day==6) ? 'selected' : ''; ?> value="6">Sabato</option>
|
|
|
|
|
<option <?php echo ($onair_day==7) ? 'selected' : ''; ?> value="7">Domenica</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<label for="onair_startdate_<?php echo $x; ?>">Data inizio</label>
|
|
|
|
|
<input type="date" name="on_air_startdate_<?php echo $x; ?>" id="on_air_startdate_<?php echo $x; ?>" value="<?php echo $onair_startdate[$x]; ?>" style="width: 40%;" />
|
|
|
|
|
<input type="date" name="on_air_startdate_<?php echo $x; ?>" id="on_air_startdate_<?php echo $x; ?>" value="<?php echo $onair_startdate; ?>" style="width: 40%;" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<select name="on_air_cadence_<?php echo $x; ?>" id="on_air_cadence_<?php echo $x; ?>">
|
|
|
|
|
<label for="on_air_cadence_<?php echo $x; ?>">Cadenza</label>
|
|
|
|
|
<option <?php echo ($onair_cadence[$x]==1) ? 'selected' : ''; ?> value="1">Una volta a settimana</option>
|
|
|
|
|
<option <?php echo ($onair_cadence[$x]==2) ? 'selected' : ''; ?> value="2">Una volta ogni 2 settimane</option>
|
|
|
|
|
<option <?php echo ($onair_cadence[$x]==3) ? 'selected' : ''; ?> value="3" type="hidden">Una volta ogni 3 settimane</option>
|
|
|
|
|
<option <?php echo ($onair_cadence[$x]==4) ? 'selected' : ''; ?> value="4">Una volta ogni 4 settimane</option>
|
|
|
|
|
<option <?php echo ($onair_cadence[$x]==5) ? 'selected' : ''; ?> value="5">Una volta al mese</option>
|
|
|
|
|
<option <?php echo ($onair_cadence==1) ? 'selected' : ''; ?> value="1">Una volta a settimana</option>
|
|
|
|
|
<option <?php echo ($onair_cadence==2) ? 'selected' : ''; ?> value="2">Una volta ogni 2 settimane</option>
|
|
|
|
|
<option <?php echo ($onair_cadence==3) ? 'selected' : ''; ?> value="3" hidden>Una volta ogni 3 settimane</option>
|
|
|
|
|
<option <?php echo ($onair_cadence==4) ? 'selected' : ''; ?> value="4">Una volta ogni 4 settimane</option>
|
|
|
|
|
<option <?php echo ($onair_cadence==5) ? 'selected' : ''; ?> value="5">Una volta al mese</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<label for="on_air_start_<?php echo $x; ?>">Ora inizio</label>
|
|
|
|
|
<input type="time" name="on_air_start_<?php echo $x; ?>" id="on_air_start_<?php echo $x; ?>" value="<?php echo $onair_start[$x]; ?>" style="width: 40%;" />
|
|
|
|
|
<input type="time" name="on_air_start_<?php echo $x; ?>" id="on_air_start_<?php echo $x; ?>" value="<?php echo $onair_start; ?>" style="width: 40%;" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<label for="on_air_end_<?php echo $x; ?>">Ora fine</label>
|
|
|
|
|
<input type="time" name="on_air_end_<?php echo $x; ?>" id="on_air_end_<?php echo $x; ?>" value="<?php echo $onair_end[$x]; ?>" style="width: 40%;" />
|
|
|
|
|
<input type="time" name="on_air_end_<?php echo $x; ?>" id="on_air_end_<?php echo $x; ?>" value="<?php echo $onair_end; ?>" style="width: 40%;" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
<?php
|
|
|
|
@ -108,49 +106,49 @@ function orari_repliche_input($post)
|
|
|
|
|
$rerun_day = $rerun_cadence = $rerun_startdate = $rerun_start = $rerun_end = array();
|
|
|
|
|
wp_nonce_field('rerun_nonce', 're_run_nonce');
|
|
|
|
|
for ($x=0;$x<7;$x++) :
|
|
|
|
|
$rerun_day[$x] = isset($values['rerun_day_'.$x]) ? esc_attr($values['rerun_day_'.$x][0]) : '';
|
|
|
|
|
$rerun_start[$x] = isset($values['rerun_start_'.$x]) ? esc_attr($values['rerun_start_'.$x][0]) : '';
|
|
|
|
|
$rerun_end[$x] = isset($values['rerun_end_'.$x]) ? esc_attr($values['rerun_end_'.$x][0]) : '';
|
|
|
|
|
$rerun_cadence[$x] = isset($values['rerun_cadence_'.$x]) ? esc_attr($values['rerun_cadence_'.$x][0]) : '';
|
|
|
|
|
$rerun_startdate[$x] = isset($values['rerun_startdate_'.$x]) ? esc_attr($values['rerun_startdate_'.$x][0]) : '';
|
|
|
|
|
$rerun_day = isset($values['rerun_day_'.$x]) ? esc_attr($values['rerun_day_'.$x][0]) : '';
|
|
|
|
|
$rerun_start = isset($values['rerun_start_'.$x]) ? esc_attr($values['rerun_start_'.$x][0]) : '';
|
|
|
|
|
$rerun_end = isset($values['rerun_end_'.$x]) ? esc_attr($values['rerun_end_'.$x][0]) : '';
|
|
|
|
|
$rerun_cadence = isset($values['rerun_cadence_'.$x]) ? esc_attr($values['rerun_cadence_'.$x][0]) : '';
|
|
|
|
|
$rerun_startdate = isset($values['rerun_startdate_'.$x]) ? esc_attr($values['rerun_startdate_'.$x][0]) : '';
|
|
|
|
|
?>
|
|
|
|
|
<div style='width:100%;float:left;'>
|
|
|
|
|
<h3>Replica n. <?php echo $x+1; ?></h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<select name="rerun_day_<?php echo $x; ?>" id="rerun_day_<?php echo $x; ?>">
|
|
|
|
|
<option <?php echo ($rerun_day[$x]=='') ? 'selected' : ''; ?> value="">Seleziona un giorno</option>
|
|
|
|
|
<option <?php echo ($rerun_day[$x]==1) ? 'selected' : ''; ?> value="1">Lunedì</option>
|
|
|
|
|
<option <?php echo ($rerun_day[$x]==2) ? 'selected' : ''; ?> value="2">Martedì</option>
|
|
|
|
|
<option <?php echo ($rerun_day[$x]==3) ? 'selected' : ''; ?> value="3">Mercoledì</option>
|
|
|
|
|
<option <?php echo ($rerun_day[$x]==4) ? 'selected' : ''; ?> value="4">Giovedì</option>
|
|
|
|
|
<option <?php echo ($rerun_day[$x]==5) ? 'selected' : ''; ?> value="5">Venerdì</option>
|
|
|
|
|
<option <?php echo ($rerun_day[$x]==6) ? 'selected' : ''; ?> value="6">Sabato</option>
|
|
|
|
|
<option <?php echo ($rerun_day[$x]==7) ? 'selected' : ''; ?> value="7">Domenica</option>
|
|
|
|
|
<option <?php echo ($rerun_day=='') ? 'selected' : ''; ?> value="">Seleziona un giorno</option>
|
|
|
|
|
<option <?php echo ($rerun_day==1) ? 'selected' : ''; ?> value="1">Lunedì</option>
|
|
|
|
|
<option <?php echo ($rerun_day==2) ? 'selected' : ''; ?> value="2">Martedì</option>
|
|
|
|
|
<option <?php echo ($rerun_day==3) ? 'selected' : ''; ?> value="3">Mercoledì</option>
|
|
|
|
|
<option <?php echo ($rerun_day==4) ? 'selected' : ''; ?> value="4">Giovedì</option>
|
|
|
|
|
<option <?php echo ($rerun_day==5) ? 'selected' : ''; ?> value="5">Venerdì</option>
|
|
|
|
|
<option <?php echo ($rerun_day==6) ? 'selected' : ''; ?> value="6">Sabato</option>
|
|
|
|
|
<option <?php echo ($rerun_day==7) ? 'selected' : ''; ?> value="7">Domenica</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<label for="rerun_startdate_<?php echo $x; ?>">Data inizio</label>
|
|
|
|
|
<input type="date" name="rerun_startdate_<?php echo $x; ?>" id="rerun_startdate_<?php echo $x; ?>" value="<?php echo $rerun_startdate[$x]; ?>" style="width: 40%;" />
|
|
|
|
|
<input type="date" name="rerun_startdate_<?php echo $x; ?>" id="rerun_startdate_<?php echo $x; ?>" value="<?php echo $rerun_startdate; ?>" style="width: 40%;" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<select name="rerun_cadence_<?php echo $x; ?>" id="rerun_cadence_<?php echo $x; ?>">
|
|
|
|
|
<label for="rerun_cadence_<?php echo $x; ?>">Cadenza</label>
|
|
|
|
|
<option <?php echo ($rerun_cadence[$x]==1) ? 'selected' : ''; ?> value="1">Una volta a settimana</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence[$x]==2) ? 'selected' : ''; ?> value="2">Una volta ogni 2 settimane</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence[$x]==3) ? 'selected' : ''; ?> value="3" type="hidden">Una volta ogni 3 settimane</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence[$x]==4) ? 'selected' : ''; ?> value="4" type="hidden">Una volta ogni 4 settimane</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence[$x]==5) ? 'selected' : ''; ?> value="3">Una volta al mese</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence==1) ? 'selected' : ''; ?> value="1">Una volta a settimana</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence==2) ? 'selected' : ''; ?> value="2">Una volta ogni 2 settimane</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence==3) ? 'selected' : ''; ?> value="3" hidden>Una volta ogni 3 settimane</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence==4) ? 'selected' : ''; ?> value="4">Una volta ogni 4 settimane</option>
|
|
|
|
|
<option <?php echo ($rerun_cadence==5) ? 'selected' : ''; ?> value="3">Una volta al mese</option>
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<label for="rerun_start_<?php echo $x; ?>">Ora inizio</label>
|
|
|
|
|
<input type="time" name="rerun_start_<?php echo $x; ?>" id="rerun_start_<?php echo $x; ?>" value="<?php echo $rerun_start[$x]; ?>" style="width: 40%;" />
|
|
|
|
|
<input type="time" name="rerun_start_<?php echo $x; ?>" id="rerun_start_<?php echo $x; ?>" value="<?php echo $rerun_start; ?>" style="width: 40%;" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style='width:20%;float:left;'>
|
|
|
|
|
<label for="rerun_end_<?php echo $x; ?>">Ora fine</label>
|
|
|
|
|
<input type="time" name="rerun_end_<?php echo $x; ?>" id="rerun_end_<?php echo $x; ?>" value="<?php echo $rerun_end[$x]; ?>" style="width: 40%;" />
|
|
|
|
|
<input type="time" name="rerun_end_<?php echo $x; ?>" id="rerun_end_<?php echo $x; ?>" value="<?php echo $rerun_end; ?>" style="width: 40%;" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
<?php
|
|
|
|
|