Exemple #1
0
        <div><?php 
echo _("Angezeigte Wochentage");
?>
:</div>
        <? foreach (array(1,2,3,4,5,6,0) as $day) : ?>
            <label>
                <input type="checkbox" name="days[]" value="<?php 
echo $day;
?>
"
                    <?php 
echo in_array($day, $settings['glb_days']) !== false ? 'checked="checked"' : '';
?>
>
                <?php 
echo getWeekDay($day, false);
?>
            </label><br>
        <? endforeach ?>
        <span class="invalid_message"><?php 
echo _("Bitte mindestens einen Wochentag auswählen.");
?>
</span><br>
    </div>

    <div style="text-align: center; clear: both" data-dialog-button>
        <?php 
echo Button::createSuccess(_('Speichern'), array('onclick' => "return STUDIP.Calendar.validateNumberOfDays();"));
?>
        <?php 
echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('calendar/schedule/#'));
 /**
  * Parses the shortcodes, old method used for backward compatibility
  * @param type $content
  * @return type
  */
 protected function parse_event_old($template)
 {
     // get post meta
     $meta_venues = am_get_the_venue();
     $meta_event_categories = am_get_the_event_category();
     $meta_startdate = am_get_the_startdate();
     $meta_enddate = am_get_the_enddate();
     // get timestamps of dates
     $timestamp_start = strtotime($meta_startdate);
     $timestamp_end = strtotime($meta_enddate);
     //get all the widget template data
     $template_startdate = date(_x('m/d/Y', 'upcoming events widget', 'am-events'), $timestamp_start);
     $template_enddate = date(_x('m/d/Y', 'upcoming events widget', 'am-events'), $timestamp_end);
     $template_starttime = date(_x('H:i', 'upcoming events widget', 'am-events'), $timestamp_start);
     $template_endtime = date(_x('H:i', 'upcoming events widget', 'am-events'), $timestamp_end);
     $template_startdayname = getWeekDay(date('N', $timestamp_start));
     $template_enddayname = getWeekDay(date('N', $timestamp_end));
     $template_venue = '';
     if (count($meta_venues) > 0) {
         $template_venue = $meta_venues[0]->name;
     }
     $template_event_category = '';
     if (count($meta_event_categories) > 0) {
         $template_event_category = $meta_event_categories[0]->name;
     }
     $template_title = get_the_title();
     $template_content = get_the_content();
     // Widget template tags
     $search = array('{{start_day_name}}', '{{start_date}}', '{{start_time}}', '{{end_day_name}}', '{{end_date}}', '{{end_time}}', '{{title}}', '{{event_category}}', '{{venue}}', '{{content}}', '{{thumbnail}}');
     $replace = array($template_startdayname, $template_startdate, $template_starttime, $template_enddayname, $template_enddate, $template_endtime, $template_title, $template_event_category, $template_venue, $template_content);
     return str_replace($search, $replace, $template);
 }
 public function getAllDates($seminar, $start, $end)
 {
     $data = $seminar->getUndecoratedData();
     $date = array();
     $i = 0;
     if (is_array($data['regular']['turnus_data'])) {
         foreach ($data['regular']['turnus_data'] as $cycle_id => $cycle) {
             $date[$i]['time'] = sprintf('%02d:%02d - %02d:%02d', $cycle['start_hour'], $cycle['start_minute'], $cycle['end_hour'], $cycle['end_minute']);
             $date[$i]['interval'] = empty($data['regular']['turnus']) ? '' : _("14-täglich");
             if (Config::get()->RESOURCES_ENABLE) {
                 if ($room_ids = $seminar->metadate->cycles[$cycle_id]->getPredominantRoom($start, $end)) {
                     foreach ($room_ids as $room_id) {
                         $res_obj = ResourceObject::Factory($room_id);
                         $room_names[] = $res_obj->getName();
                     }
                     $date[$i]['room'] = implode(', ', $room_names);
                 } else {
                     $date[$i]['room'] = trim($seminar->metadate->cycles[$cycle_id]->getFreeTextPredominantRoom($start, $end));
                 }
                 $date[$i]['dow'] = getWeekDay($cycle['day']);
             }
             $i++;
         }
     }
     if (sizeof((array) $data['irregular'])) {
         foreach ($data['irregular'] as $irregular_date) {
             if ($irregular_date['start_time'] >= $start && $irregular_date['start_time'] <= $end) {
                 $date[$i]['time'] = date('H:i', $irregular_date['start_time']) . date(' - H:i', $irregular_date['end_time']);
                 $date[$i]['date'] = strftime('%x', $irregular_date['start_time']);
                 $date[$i]['dow'] = getWeekDay(date('w', $irregular_date['start_time']));
                 if (Config::get()->RESOURCES_ENABLE && $irregular_date['resource_id']) {
                     $res_obj = ResourceObject::Factory($irregular_date['resource_id']);
                     $date[$i]['room'] = $res_obj->getName();
                 } else {
                     $date[$i]['room'] = trim($irregular_date['raum']);
                 }
                 $i++;
             }
         }
     }
     return $date;
 }
	<tr height=20>
		<td bgcolor=efefef><img src='./module/WebLog/image/blank.gif' width=5 height=1></td>
		<td bgcolor=efefef><img src='./module/WebLog/image/blank.gif' width=95 height=1><br><a onclick="MonthChange1('<?php 
            echo $year;
            ?>
','<?php 
            echo $month;
            ?>
','<?php 
            echo $o;
            ?>
')"><font class='Blink'><?php 
            echo $o;
            ?>
日</font></a> (<?php 
            echo getWeekDay($year, $month, $o);
            ?>
)</td>
		<td width=90%><img src='./module/WebLog/image/grp1.gif' height='10' width='<?php 
            echo $width;
            ?>
'>
		<?php 
            if ($NUM[0]) {
                ?>
<font size=1 color=gray><?php 
                echo number_format($NUM[0]);
                ?>
 (<?php 
                echo $per;
                ?>
Exemple #5
0
 $dayBeforeNum = 0;
 if (!empty($lineid)) {
     $dayBeforeInfo = $dsql->GetOne("select linebefore from #@__line where id={$lineid}");
     $dayBeforeNum = !empty($dayBeforeInfo['linebefore']) ? $dayBeforeInfo['linebefore'] : $dayBeforeNum;
 }
 $dayBefore = $time;
 if (isLineBefore($lineid)) {
     $dayBefore += $dayBeforeNum * 24 * 60 * 60;
 }
 foreach ($arr as $row) {
     if ($row['day'] < $dayBefore) {
         continue;
     }
     $day = date('Y-m-d', $row['day']);
     //m-d
     $weekday = '周' . getWeekDay(date('w', $row['day']));
     //周X
     if (in_array(2, $group)) {
         $adultprice = $row['adultprice'];
         $peopleinfo = '成人价 ' . $adultprice;
         $out['hasadult'] = 1;
     }
     if (in_array(1, $group) && !empty($row['childprice'])) {
         $childprice = $row['childprice'];
         $peopleinfo .= '儿童价 ' . $childprice;
         $out['haschild'] = 1;
     }
     if (in_array(3, $group) && !empty($row['oldprice'])) {
         $oldprice = $row['oldprice'];
         $peopleinfo .= '老人价 ' . $oldprice;
         $out['hasold'] = 1;
Exemple #6
0
        <freitext><?php 
echo htmlReady($freitext);
?>
</freitext>
    </raum>
</raumzeit>
<? endforeach ?>
<? $presence_types = getPresenceTypes(); ?>
<? if (is_array($dates['irregular'])) foreach ($dates['irregular'] as $date) : ?>
<raumzeit>
    <datum><?php 
echo date('d.m.Y', $date['start_time']);
?>
</datum>
    <wochentag><?php 
echo getWeekDay(date('w', $date['start_time']), false);
?>
</wochentag>
    <zeit><?php 
echo date('H:i', $date['start_time']);
?>
-<?php 
echo date('H:i', $date['end_time']);
?>
</zeit>
    <raum>
        <gebucht><?php 
echo htmlReady(implode(', ', getPlainRooms(array($date['resource_id'] => 1))));
?>
</gebucht>
        <freitext><?php 
Exemple #7
0
    <?php 
echo CSRFProtection::tokenTag();
?>
    <b><?php 
echo _("Tag");
?>
:</b> <select name="entry_day">
        <? foreach (array(1,2,3,4,5,6,7) as $index) : ?>
        <option value="<?php 
echo $index;
?>
" <?php 
echo isset($show_entry['day']) && $show_entry['day'] == $index ? 'selected="selected"' : '';
?>
><?php 
echo getWeekDay($index % 7, false);
?>
</option>
        <? endforeach ?>
    </select>

    <div id="schedule_entry_hours">
        <?php 
echo _("von");
?>
        <input type="text" size="2" name="entry_start_hour" value="<?php 
echo $show_entry['start_hour'];
?>
"
            onChange="STUDIP.Calendar.validateHour(this)"> :
        <input type="text" size="2" name="entry_start_minute" value="<?php 
Exemple #8
0
    $o = $i < 10 ? '0' . $i : $i;
    ?>
<td><a href='add_count.php?mode=hour&year=<?php 
    echo $tyear;
    ?>
&month=<?php 
    echo $tmonth;
    ?>
&day=<?php 
    echo $o;
    ?>
'><?php 
    echo $o;
    ?>
<br><?php 
    echo getWeekDay($tyear, $tmonth, $o);
    ?>
</a></td>
<?php 
}
?>
</tr>

</table>


<br>
<br>
<br>

<p align=center>
Exemple #9
0
<!--------------------------------------------------------------------------------------------- 월별 --->

<!--------------------------------------------------------------------------------------------- 일별 --->
<?php 
if ($mode == 'day') {
    ?>

<table width=100% cellspacing=0 cellpadding=0>
<?php 
    $TOT = db_fetch_array(db_query("SELECT sum(CT_HIT) FROM kimsmall7_count WHERE CT_DATE LIKE '" . $year . $month . "%'", $DB_CONNECT));
    for ($i = 1; $i < 32; $i++) {
        $o = $i < 10 ? "0" . $i : $i;
        $NUM = db_fetch_array(db_query("SELECT sum(CT_HIT) FROM kimsmall7_count WHERE CT_DATE='" . $year . $month . $o . "'", $DB_CONNECT));
        $per = @round($NUM[0] / $TOT[0] * 100, 1);
        $width = (int) $per * 5;
        $yoil = getWeekDay($year, $month, $o);
        ?>
	<tr height=20>
		<td bgcolor=efefef><img src='./module/WebLog/image/blank.gif' width=5 height=1></td>
		<td bgcolor=efefef><img src='./module/WebLog/image/blank.gif' width=95 height=1><br><a onclick="DayChange('<?php 
        echo $o;
        ?>
')"><font class='Blink'><?php 
        echo $o;
        ?>
日</font></a> (<?php 
        echo $yoil;
        ?>
)</td>
		<td width=90%><img src='./module/WebLog/image/grp1.gif' height='10' width='<?php 
        echo $width;
<table width=720>
<tr>
<td>
<img src='./image/dot_03.gif' align=absmiddle>
<b><?php 
    echo $year;
    ?>
년 <?php 
    echo $month;
    ?>
월 <?php 
    echo $day;
    ?>
일(<?php 
    echo getWeekDay($year, $month, $day);
    ?>
) 일정</b> >>

<a href='<?php 
    echo $THIS_FILE;
    ?>
?year=<?php 
    echo $year;
    ?>
&month=<?php 
    echo $month;
    ?>
&day=<?php 
    echo $day;
    ?>
 /**
  * returns a string for a date like '3. 9:00s - 10:45' (short and long)
  * or '3. 9:00s - 10:45, , ab der 7. Semesterwoche, (Vorlesung)' with the week of the semester
  * @param format string: "short"|"long"|"full"
  * @return formatted string
  */
 public function toString($format = 'short')
 {
     $template['short'] = '%s. %02s:%02s - %02s:%02s';
     $template['long'] = '%s: %02s:%02s - %02s:%02s, %s';
     $template['full'] = '%s: %02s:%02s - %02s:%02s, ' . _('%s, ab der %s. Semesterwoche');
     if ($this->end_offset) {
         $template['full'] .= ' bis zur %s. Semesterwoche';
     } else {
         $template['full'] .= '%s';
     }
     $template['full'] .= '%s';
     $cycles = array(_('wöchentlich'), _('zweiwöchentlich'), _('dreiwöchentlich'));
     $day = getWeekDay($this->weekday, $format == 'short');
     $result = sprintf($template[$format], $day, $this->start_hour, $this->start_minute, $this->end_hour, $this->end_minute, $cycles[(int) $this->cycle], $this->week_offset + 1, $this->end_offset ? $this->end_offset : '', $this->description ? ' (' . $this->description . ')' : '');
     return $result;
 }
Exemple #12
0
	<td valign="top" bgcolor="#ffffff">

	<table width=100% cellspacing=0 cellpadding=0>
	<tr bgcolor='#F8F3E9'>
		<td height=30> 
		&nbsp;&nbsp;<b><?php 
echo $cal_year;
?>
년 <?php 
echo (int) $cal_month;
?>
월 <?php 
echo (int) $cal_day;
?>
일(<?php 
echo getWeekDay($cal_year, $cal_month, $cal_day);
?>
) 일정</b>
		</td>
		<td align=right>
		<img src='<?php 
echo $gSkinImg;
?>
/ico_write.gif' align=absmiddle onClick="SkinRegisCal('<?php 
echo $cal_year;
?>
','<?php 
echo $cal_month;
?>
','<?php 
echo $cal_day;