当前位置: 首页>>代码示例>>PHP>>正文


PHP COM_getMinuteFormOptions函数代码示例

本文整理汇总了PHP中COM_getMinuteFormOptions函数的典型用法代码示例。如果您正苦于以下问题:PHP COM_getMinuteFormOptions函数的具体用法?PHP COM_getMinuteFormOptions怎么用?PHP COM_getMinuteFormOptions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了COM_getMinuteFormOptions函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: LIB_datetimeedit

function LIB_datetimeedit($datetime_value, $lang, $datetime_name = "datetime", $mode = "datetime")
{
    global $_CONF;
    $var = $lang;
    global ${$var};
    $lang_ary = ${$var};
    $datetime_year = date('Y', $datetime_value);
    $datetime_month = date('m', $datetime_value);
    $datetime_day = date('d', $datetime_value);
    //
    $datetime_hour = date('H', $datetime_value);
    $datetime_minute = date('i', $datetime_value);
    $rt = "";
    //Year
    $year_options = COM_getYearFormOptions($datetime_year);
    $rt .= "<select name=\"" . $datetime_name . "_year\">" . LB;
    $rt .= $year_options . LB;
    $rt .= "</select>" . $lang_ary['yy'] . LB;
    //month
    $month_options = COM_getMonthFormOptions($datetime_month);
    $rt .= "<select name=\"" . $datetime_name . "_month\">" . LB;
    $rt .= $month_options . LB;
    $rt .= "</select>" . $lang_ary['mm'] . LB;
    //day
    $day_options = COM_getDayFormOptions($datetime_day);
    $rt .= "<select name=\"" . $datetime_name . "_day\">" . LB;
    $rt .= $day_options . LB;
    $rt .= "</select>" . $lang_ary['dd'] . LB;
    //hour
    if ($mode === "datetime") {
        if ($_CONF['hour_mode'] == 24) {
            $hour_options = COM_getHourFormOptions($datetime_hour, 24);
        } else {
            $datetime_hour_wk = $datetime_hour;
            if ($datetime_hour_wk >= 12) {
                if ($datetime_hour_wk > 12) {
                    $datetime_hour_wk = $datetime_hour_wk - 12;
                }
                $ampm = 'pm';
            } else {
                $ampm = 'am';
            }
            $ampm_select = COM_getAmPmFormSelection($datetime_name . '_ampm', $ampm);
            if (empty($ampm_select)) {
                $ampm_select = '<input type="hidden" name="cmt_close_ampm" value=""' . XHTML . '>';
            }
            $rt .= $ampm_select;
            $hour_options = COM_getHourFormOptions($datetime_hour_wk);
        }
        $rt .= "<select name=\"" . $datetime_name . "_hour\">" . LB;
        $rt .= $hour_options . LB;
        $rt .= "</select>:" . LB;
        //minute
        $minute_options = COM_getMinuteFormOptions($datetime_minute);
        $rt .= "<select name=\"" . $datetime_name . "_minute\">" . LB;
        $rt .= $minute_options . LB;
        $rt .= "</select>" . LB;
    }
    return $rt;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:60,代码来源:lib_datetimeedit.php

示例2: fncdatetimeedit

function fncdatetimeedit($datetime_value, $title, $token, $script = "", $datetime = "datetime")
{
    global $_CONF;
    global $LANG_CONFIG;
    global $_SCRIPTS;
    $pi_name = "assist";
    $tmplfld = assist_templatePath('admin', 'default', $pi_name);
    $tmpl = new Template($tmplfld);
    $tmpl->set_file(array('datetimeedit' => 'datetime.thtml'));
    // Loads jQuery UI datepicker
    if (version_compare(VERSION, '2.0.0') >= 0) {
        $_SCRIPTS->setJavaScriptLibrary('jquery.ui.datepicker');
        $_SCRIPTS->setJavaScriptLibrary('jquery-ui-i18n');
        $_SCRIPTS->setJavaScriptFile('datepicker', '/javascript/datepicker.js');
        $langCode = COM_getLangIso639Code();
        $toolTip = 'Click and select a date';
        // Should be translated
        $imgUrl = $_CONF['site_url'] . '/images/calendar.png';
        $_SCRIPTS->setJavaScript("jQuery(function () {" . "  geeklog.datepicker.set('datetime', '{$langCode}', '{$toolTip}', '{$imgUrl}');" . "});", TRUE, TRUE);
    }
    $datetime_month = date('m', $datetime_value);
    $datetime_day = date('d', $datetime_value);
    $datetime_year = date('Y', $datetime_value);
    $datetime_hour = date('H', $datetime_value);
    $datetime_minute = date('i', $datetime_value);
    //
    $month_options = COM_getMonthFormOptions($datetime_month);
    $day_options = COM_getDayFormOptions($datetime_day);
    $year_options = COM_getYearFormOptions($datetime_year);
    $hour_options = COM_getHourFormOptions($datetime_hour, 24);
    $minute_options = COM_getMinuteFormOptions($datetime_minute);
    $tmpl->set_var('site_url', $_CONF['site_url']);
    $tmpl->set_var('datetime_script', $script);
    $tmpl->set_var('datetime_title', $title);
    $tmpl->set_var('datetime', $datetime);
    $tmpl->set_var('datetime_year_options', $year_options);
    $tmpl->set_var('datetime_month_options', $month_options);
    $tmpl->set_var('datetime_day_options', $day_options);
    $tmpl->set_var('datetime_hour_options', $hour_options);
    $tmpl->set_var('datetime_minute_options', $minute_options);
    $tmpl->set_var('lang_yy', "年");
    $tmpl->set_var('lang_mm', "月");
    $tmpl->set_var('gltoken_name', CSRF_TOKEN);
    $tmpl->set_var('gltoken', $token);
    $tmpl->set_var('xhtml', XHTML);
    $tmpl->set_var('save_changes', $LANG_CONFIG['save_changes']);
    //
    $tmpl->parse('output', 'datetimeedit');
    $rt = $tmpl->finish($tmpl->get_var('output'));
    return $rt;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:51,代码来源:vars.php

示例3: EVLIST_TimeSelect

/**
*   Get an array of option lists for year, month, day, etc.
*
*   @param  string  $prefix     Prefix to use for ampm variable name
*   @param  string  $curdate    SQL-formatted date to use as default
*   @param  string  $curtime    SQL-formatted time to use as default
*   @return array               Array of option lists, indexed by type
*/
function EVLIST_TimeSelect($prefix, $curtime = '')
{
    global $_CONF;
    // Use "now" as the default if nothing else sent.  Also helps make sure
    // that the explode() function works right.
    if (empty($curtime)) {
        $curtime = date('H:i:s');
    }
    list($hour, $minute, $second) = explode(':', $curtime);
    // Set up the time if we're using 12-hour mode
    if ($_CONF['hour_mode'] == 12) {
        $ampm = $hour < 12 ? 'am' : 'pm';
        if ($hour == 0) {
            $hour = 12;
        } elseif ($hour > 12) {
            $hour -= 12;
        }
    }
    $hourselect = COM_getHourFormOptions($hour, $_CONF['hour_mode']);
    $minuteselect = COM_getMinuteFormOptions($minute, 15);
    // This function gets the entire selection, not just the <option> parts,
    // so we use $prefix to create the variable name.
    $ampm_select = COM_getAmPmFormSelection($prefix . '_ampm', $ampm);
    return array('hour' => $hourselect, 'minute' => $minuteselect, 'ampm' => $ampm_select);
}
开发者ID:NewRoute,项目名称:evlist,代码行数:33,代码来源:evlist_functions.inc.php

示例4: storyeditor


//.........这里部分代码省略.........
    $story_templates->set_var('group_dropdown', SEC_getGroupDropdown($story->EditElements('group_id'), 3));
    $story_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
    $story_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
    $story_templates->set_var('permissions_editor', SEC_getPermissionsHTML($story->EditElements('perm_owner'), $story->EditElements('perm_group'), $story->EditElements('perm_members'), $story->EditElements('perm_anon')));
    $story_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
    $story_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
    $curtime = COM_getUserDateTimeFormat($story->EditElements('date'));
    $story_templates->set_var('lang_date', $LANG24[15]);
    $story_templates->set_var('publish_second', $story->EditElements('publish_second'));
    $publish_ampm = '';
    $publish_hour = $story->EditElements('publish_hour');
    if ($publish_hour >= 12) {
        if ($publish_hour > 12) {
            $publish_hour = $publish_hour - 12;
        }
        $ampm = 'pm';
    } else {
        $ampm = 'am';
    }
    $ampm_select = COM_getAmPmFormSelection('publish_ampm', $ampm);
    $story_templates->set_var('publishampm_selection', $ampm_select);
    $month_options = COM_getMonthFormOptions($story->EditElements('publish_month'));
    $story_templates->set_var('publish_month_options', $month_options);
    $day_options = COM_getDayFormOptions($story->EditElements('publish_day'));
    $story_templates->set_var('publish_day_options', $day_options);
    $year_options = COM_getYearFormOptions($story->EditElements('publish_year'));
    $story_templates->set_var('publish_year_options', $year_options);
    if ($_CONF['hour_mode'] == 24) {
        $hour_options = COM_getHourFormOptions($story->EditElements('publish_hour'), 24);
    } else {
        $hour_options = COM_getHourFormOptions($publish_hour);
    }
    $story_templates->set_var('publish_hour_options', $hour_options);
    $minute_options = COM_getMinuteFormOptions($story->EditElements('publish_minute'));
    $story_templates->set_var('publish_minute_options', $minute_options);
    $story_templates->set_var('publish_date_explanation', $LANG24[46]);
    $story_templates->set_var('story_unixstamp', $story->EditElements('unixdate'));
    $story_templates->set_var('expire_second', $story->EditElements('expire_second'));
    $expire_ampm = '';
    $expire_hour = $story->EditElements('expire_hour');
    if ($expire_hour >= 12) {
        if ($expire_hour > 12) {
            $expire_hour = $expire_hour - 12;
        }
        $ampm = 'pm';
    } else {
        $ampm = 'am';
    }
    $ampm_select = COM_getAmPmFormSelection('expire_ampm', $ampm);
    if (empty($ampm_select)) {
        // have a hidden field to 24 hour mode to prevent JavaScript errors
        $ampm_select = '<input type="hidden" name="expire_ampm" value=""' . XHTML . '>';
    }
    $story_templates->set_var('expireampm_selection', $ampm_select);
    $month_options = COM_getMonthFormOptions($story->EditElements('expire_month'));
    $story_templates->set_var('expire_month_options', $month_options);
    $day_options = COM_getDayFormOptions($story->EditElements('expire_day'));
    $story_templates->set_var('expire_day_options', $day_options);
    $year_options = COM_getYearFormOptions($story->EditElements('expire_year'));
    $story_templates->set_var('expire_year_options', $year_options);
    if ($_CONF['hour_mode'] == 24) {
        $hour_options = COM_getHourFormOptions($story->EditElements('expire_hour'), 24);
    } else {
        $hour_options = COM_getHourFormOptions($expire_hour);
    }
    $story_templates->set_var('expire_hour_options', $hour_options);
开发者ID:geeklog-cms,项目名称:geeklog,代码行数:67,代码来源:story.php

示例5: editpersonalevent

/**
* Allows user to edit a personal calendar event
*
* @param    array   $A  Record to display
* @return   string      HTML for event editor
*
*/
function editpersonalevent($A)
{
    global $_CONF, $_CAJP_CONF, $LANG_CALJP_1;
    $ja = $_CONF['language'] == 'japanese_utf-8';
    $cal_templates = COM_newTemplate($_CONF['path'] . 'plugins/calendarjp/templates/');
    $cal_templates->set_file('form', 'editpersonalevent' . ($ja ? '_ja' : '') . '.thtml');
    $cal_templates->set_var('lang_title', $LANG_CALJP_1[28]);
    $title = stripslashes($A['title']);
    $title = str_replace('{', '&#123;', $title);
    $title = str_replace('}', '&#125;', $title);
    $title = str_replace('"', '&quot;', $title);
    $cal_templates->set_var('event_title', $title);
    $cal_templates->set_var('lang_eventtype', $LANG_CALJP_1[37]);
    $type_options = CALENDARJP_eventTypeList($A['event_type']);
    $cal_templates->set_var('type_options', $type_options);
    // Handle start date/time
    $cal_templates->set_var('lang_startdate', $LANG_CALJP_1[21]);
    $cal_templates->set_var('lang_starttime', $LANG_CALJP_1[30]);
    $A['startdate'] = $A['datestart'] . ' ' . $A['timestart'];
    $start_month = date('n', strtotime($A['startdate']));
    $month_options = CALENDARJP_getMonthFormOptions($start_month);
    $cal_templates->set_var('startmonth_options', $month_options);
    $start_day = date('j', strtotime($A['startdate']));
    $day_options = COM_getDayFormOptions($start_day);
    $cal_templates->set_var('startday_options', $day_options);
    $start_year = date('Y', strtotime($A['startdate']));
    $year_options = COM_getYearFormOptions($start_year);
    $cal_templates->set_var('startyear_options', $year_options);
    if (isset($_CAJP_CONF['hour_mode']) && $_CAJP_CONF['hour_mode'] == 24) {
        $start_hour = date('H', strtotime($A['startdate']));
        $hour_options = COM_getHourFormOptions($start_hour, 24);
        $cal_templates->set_var('starthour_options', $hour_options);
    } else {
        $start_hour = date('g', strtotime($A['startdate']));
        $hour_options = COM_getHourFormOptions($start_hour);
        $cal_templates->set_var('starthour_options', $hour_options);
    }
    $startmin = intval(date('i', strtotime($A['startdate'])) / 15) * 15;
    $cal_templates->set_var('startminute_options', COM_getMinuteFormOptions($startmin, 15));
    $ampm = date('a', strtotime($A['startdate']));
    $cal_templates->set_var('startampm_selection', CALENDARJP_getAmPmFormSelection('startampm_selection', $ampm));
    // Handle end date/time
    $cal_templates->set_var('lang_enddate', $LANG_CALJP_1[18]);
    $cal_templates->set_var('lang_endtime', $LANG_CALJP_1[29]);
    $A['enddate'] = $A['dateend'] . ' ' . $A['timeend'];
    $end_month = date('n', strtotime($A['enddate']));
    $month_options = CALENDARJP_getMonthFormOptions($end_month);
    $cal_templates->set_var('endmonth_options', $month_options);
    $end_day = date('j', strtotime($A['enddate']));
    $day_options = COM_getDayFormOptions($end_day);
    $cal_templates->set_var('endday_options', $day_options);
    $end_year = date('Y', strtotime($A['enddate']));
    $year_options = COM_getYearFormOptions($end_year);
    $cal_templates->set_var('endyear_options', $year_options);
    if (isset($_CAJP_CONF['hour_mode']) && $_CAJP_CONF['hour_mode'] == 24) {
        $end_hour = date('H', strtotime($A['enddate']));
        $hour_options = COM_getHourFormOptions($end_hour, 24);
        $cal_templates->set_var('endhour_options', $hour_options);
    } else {
        $end_hour = date('g', strtotime($A['enddate']));
        $hour_options = COM_getHourFormOptions($end_hour);
        $cal_templates->set_var('endhour_options', $hour_options);
    }
    $endmin = intval(date('i', strtotime($A['enddate'])) / 15) * 15;
    $cal_templates->set_var('endminute_options', COM_getMinuteFormOptions($endmin, 15));
    $ampm = date('a', strtotime($A['enddate']));
    $cal_templates->set_var('endampm_selection', CALENDARJP_getAmPmFormSelection('endampm_selection', $ampm));
    $cal_templates->set_var('lang_alldayevent', $LANG_CALJP_1[31]);
    if ($A['allday'] == 1) {
        $cal_templates->set_var('allday_checked', 'checked="checked"');
    } else {
        $cal_templates->set_var('allday_checked', '');
    }
    $cal_templates->set_var('lang_tail_year', $LANG_CALJP_1['tail_year']);
    $cal_templates->set_var('lang_tail_month', $LANG_CALJP_1['tail_month']);
    $cal_templates->set_var('lang_tail_day', $LANG_CALJP_1['tail_day']);
    $cal_templates->set_var('lang_location', $LANG_CALJP_1[39]);
    $cal_templates->set_var('event_location', stripslashes($A['location']));
    $cal_templates->set_var('lang_addressline1', $LANG_CALJP_1[32]);
    $cal_templates->set_var('event_address1', stripslashes($A['address1']));
    $cal_templates->set_var('lang_addressline2', $LANG_CALJP_1[33]);
    $cal_templates->set_var('event_address2', stripslashes($A['address2']));
    $cal_templates->set_var('lang_city', $LANG_CALJP_1[34]);
    $cal_templates->set_var('event_city', stripslashes($A['city']));
    $cal_templates->set_var('lang_state', $LANG_CALJP_1[35]);
    $cal_templates->set_var('state_options', '');
    $cal_templates->set_var('event_state', stripslashes($A['state']));
    $cal_templates->set_var('lang_zipcode', $LANG_CALJP_1[36]);
    $cal_templates->set_var('event_zipcode', $A['zipcode']);
    $cal_templates->set_var('lang_link', $LANG_CALJP_1[43]);
    $cal_templates->set_var('event_url', $A['url']);
    $cal_templates->set_var('lang_description', $LANG_CALJP_1[5]);
    $cal_templates->set_var('event_description', COM_nl2br(stripslashes($A['description'])));
//.........这里部分代码省略.........
开发者ID:milk54,项目名称:geeklog-japan,代码行数:101,代码来源:event.php

示例6: getQuickAdd

/**
* Builds Quick Add form
*
*/
function getQuickAdd($tpl, $month, $day, $year, $token)
{
    global $_CAJP_CONF, $LANG_CALJP_2;
    $tpl->set_var('month_options', CALENDARJP_getMonthFormOptions($month));
    $tpl->set_var('day_options', COM_getDayFormOptions($day));
    $tpl->set_var('year_options', COM_getYearFormOptions($year));
    $cur_hour = date('H', time());
    if ($cur_hour >= 12) {
        $ampm = 'pm';
    } else {
        $ampm = 'am';
    }
    $cur_hour_24 = $cur_hour % 24;
    if ($cur_hour > 12) {
        $cur_hour = $cur_hour - 12;
    } else {
        if ($cur_hour == 0) {
            $cur_hour = 12;
        }
    }
    if (isset($_CAJP_CONF['hour_mode']) && $_CAJP_CONF['hour_mode'] == 24) {
        $tpl->set_var('hour_mode', 24);
        $tpl->set_var('hour_options', COM_getHourFormOptions($cur_hour_24, 24));
    } else {
        $tpl->set_var('hour_mode', 12);
        $tpl->set_var('hour_options', COM_getHourFormOptions($cur_hour));
    }
    $tpl->set_var('startampm_selection', CALENDARJP_getAmPmFormSelection('start_ampm', $ampm));
    $cur_min = intval(date('i') / 15) * 15;
    $tpl->set_var('minute_options', COM_getMinuteFormOptions($cur_min, 15));
    $tpl->set_var('lang_event', $LANG_CALJP_2[32]);
    $tpl->set_var('lang_date', $LANG_CALJP_2[33]);
    $tpl->set_var('lang_time', $LANG_CALJP_2[34]);
    $tpl->set_var('lang_add', $LANG_CALJP_2[31]);
    $tpl->set_var('lang_quickadd', $LANG_CALJP_2[35]);
    $tpl->set_var('lang_submit', $LANG_CALJP_2[36]);
    $tpl->set_var('gltoken_name', CSRF_TOKEN);
    $tpl->set_var('gltoken', $token);
    $tpl->parse('quickadd_form', 'quickadd', true);
    return $tpl;
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:45,代码来源:index.php

示例7: COM_getMinuteOptions

/**
* For backward compatibility only.
* This function should always have been called COM_getMinuteFormOptions
* @see COM_getMinuteFormOptions
*/
function COM_getMinuteOptions($selected = '', $step = 1)
{
    return COM_getMinuteFormOptions($selected, $step);
}
开发者ID:alxstuart,项目名称:ajfs.me,代码行数:9,代码来源:lib-common.php

示例8: CALENDAR_editEvent


//.........这里部分代码省略.........
        if ($start_hour == 0) {
            $start_hour = 12;
        }
    }
    $end_hour = date('H', $end_stamp);
    $end_minute = intval(date('i', $end_stamp) / 15) * 15;
    if ($end_hour >= 12) {
        $endampm = 'pm';
    } else {
        $endampm = 'am';
    }
    $end_hour_24 = $end_hour % 24;
    if ($end_hour > 12) {
        $end_hour = $end_hour - 12;
    } else {
        if ($end_hour == 0) {
            $end_hour = 12;
        }
    }
    $month_options = COM_getMonthFormOptions($start_month);
    $event_templates->set_var('startmonth_options', $month_options);
    $month_options = COM_getMonthFormOptions($end_month);
    $event_templates->set_var('endmonth_options', $month_options);
    $day_options = COM_getDayFormOptions($start_day);
    $event_templates->set_var('startday_options', $day_options);
    $day_options = COM_getDayFormOptions($end_day);
    $event_templates->set_var('endday_options', $day_options);
    $year_options = COM_getYearFormOptions($start_year);
    $event_templates->set_var('startyear_options', $year_options);
    $year_options = COM_getYearFormOptions($end_year);
    $event_templates->set_var('endyear_options', $year_options);
    if (isset($_CA_CONF['hour_mode']) && $_CA_CONF['hour_mode'] == 24) {
        $hour_options = COM_getHourFormOptions($start_hour_24, 24);
        $event_templates->set_var('starthour_options', $hour_options);
        $hour_options = COM_getHourFormOptions($end_hour_24, 24);
        $event_templates->set_var('endhour_options', $hour_options);
        $event_templates->set_var('hour_mode', 24);
    } else {
        $hour_options = COM_getHourFormOptions($start_hour);
        $event_templates->set_var('starthour_options', $hour_options);
        $hour_options = COM_getHourFormOptions($end_hour);
        $event_templates->set_var('endhour_options', $hour_options);
        $event_templates->set_var('hour_mode', 12);
    }
    $event_templates->set_var('startampm_selection', COM_getAmPmFormSelection('start_ampm', $startampm));
    $event_templates->set_var('endampm_selection', COM_getAmPmFormSelection('end_ampm', $endampm));
    $event_templates->set_var('startminute_options', COM_getMinuteFormOptions($start_minute, 15));
    $event_templates->set_var('endminute_options', COM_getMinuteFormOptions($end_minute, 15));
    $event_templates->set_var('lang_enddate', $LANG12[13]);
    $event_templates->set_var('lang_eventenddate', $LANG_CAL_ADMIN[6]);
    $event_templates->set_var('event_enddate', $A['dateend']);
    $event_templates->set_var('lang_enddate', $LANG12[13]);
    $event_templates->set_var('lang_endtime', $LANG_CAL_1[29]);
    $event_templates->set_var('lang_alldayevent', $LANG_CAL_1[31]);
    if ($A['allday'] == 1) {
        $event_templates->set_var('allday_checked', 'checked="checked"');
    }
    $event_templates->set_var('lang_location', $LANG12[51]);
    $event_templates->set_var('event_location', stripslashes($A['location']));
    $event_templates->set_var('lang_addressline1', $LANG12[44]);
    $event_templates->set_var('event_address1', stripslashes($A['address1']));
    $event_templates->set_var('lang_addressline2', $LANG12[45]);
    $event_templates->set_var('event_address2', stripslashes($A['address2']));
    $event_templates->set_var('lang_city', $LANG12[46]);
    $event_templates->set_var('event_city', stripslashes($A['city']));
    $event_templates->set_var('lang_state', $LANG12[47]);
    $event_templates->set_var('state_options', '');
    $event_templates->set_var('event_state', stripslashes($A['state']));
    $event_templates->set_var('lang_zipcode', $LANG12[48]);
    $event_templates->set_var('event_zipcode', $A['zipcode']);
    $event_templates->set_var('lang_eventlocation', $LANG_CAL_ADMIN[7]);
    $event_templates->set_var('event_location', stripslashes($A['location']));
    $event_templates->set_var('lang_eventdescription', $LANG_CAL_ADMIN[8]);
    $event_templates->set_var('event_description', stripslashes($A['description']));
    $event_templates->set_var('lang_hits', $LANG10[30]);
    $event_templates->set_var('hits', COM_numberFormat($A['hits']));
    $event_templates->set_var('lang_save', $LANG_ADMIN['save']);
    $event_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    // user access info
    $event_templates->set_var('lang_accessrights', $LANG_ACCESS['accessrights']);
    $event_templates->set_var('lang_owner', $LANG_ACCESS['owner']);
    $ownername = COM_getDisplayName($A['owner_id']);
    $event_templates->set_var('owner_username', DB_getItem($_TABLES['users'], 'username', "uid = {$A['owner_id']}"));
    $event_templates->set_var('owner_name', $ownername);
    $event_templates->set_var('owner', $ownername);
    $event_templates->set_var('owner_id', $A['owner_id']);
    $event_templates->set_var('lang_group', $LANG_ACCESS['group']);
    $event_templates->set_var('group_dropdown', SEC_getGroupDropdown($A['group_id'], $access));
    $event_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
    $event_templates->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']);
    $event_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
    $event_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']));
    $event_templates->set_var('lang_permissions_msg', $LANG_ACCESS['permmsg']);
    $event_templates->set_var('gltoken_name', CSRF_TOKEN);
    $event_templates->set_var('gltoken', $token);
    $event_templates->parse('output', 'editor');
    $retval .= $event_templates->finish($event_templates->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:Geeklog-Core,项目名称:geeklog,代码行数:101,代码来源:index.php

示例9: CALENDAR_edit


//.........这里部分代码省略.........
        $start_hour = $start_hour - 12;
    } else {
        if ($start_hour == 0) {
            $start_hour = 12;
        }
    }
    $end_hour = date('H', $end_stamp);
    $end_minute = intval(date('i', $end_stamp) / 15) * 15;
    if ($end_hour >= 12) {
        $endampm = 'pm';
    } else {
        $endampm = 'am';
    }
    $end_hour_24 = $end_hour % 24;
    if ($end_hour > 12) {
        $end_hour = $end_hour - 12;
    } else {
        if ($end_hour == 0) {
            $end_hour = 12;
        }
    }
    $month_options = COM_getMonthFormOptions($start_month);
    $event_templates->set_var('startmonth_options', $month_options);
    $month_options = COM_getMonthFormOptions($end_month);
    $event_templates->set_var('endmonth_options', $month_options);
    $day_options = COM_getDayFormOptions($start_day);
    $event_templates->set_var('startday_options', $day_options);
    $day_options = COM_getDayFormOptions($end_day);
    $event_templates->set_var('endday_options', $day_options);
    $year_options = COM_getYearFormOptions($start_year);
    $event_templates->set_var('startyear_options', $year_options);
    $year_options = COM_getYearFormOptions($end_year);
    $event_templates->set_var('endyear_options', $year_options);
    if (isset($_CA_CONF['hour_mode']) && $_CA_CONF['hour_mode'] == 24) {
        $hour_options = COM_getHourFormOptions($start_hour_24, 24);
        $event_templates->set_var('starthour_options', $hour_options);
        $hour_options = COM_getHourFormOptions($end_hour_24, 24);
        $event_templates->set_var('endhour_options', $hour_options);
        $event_templates->set_var('hour_mode', 24);
    } else {
        $hour_options = COM_getHourFormOptions($start_hour);
        $event_templates->set_var('starthour_options', $hour_options);
        $hour_options = COM_getHourFormOptions($end_hour);
        $event_templates->set_var('endhour_options', $hour_options);
        $event_templates->set_var('hour_mode', 12);
    }
    $event_templates->set_var('startampm_selection', CALENDAR_getAmPmFormSelection('start_ampm', $startampm, 'update_ampm()'));
    $event_templates->set_var('endampm_selection', CALENDAR_getAmPmFormSelection('end_ampm', $endampm));
    $event_templates->set_var('startminute_options', COM_getMinuteFormOptions($start_minute, 15));
    $event_templates->set_var('endminute_options', COM_getMinuteFormOptions($end_minute, 15));
    $event_templates->set_var('lang_enddate', $LANG12[13]);
    $event_templates->set_var('lang_eventenddate', $LANG_CAL_ADMIN[6]);
    $event_templates->set_var('event_enddate', $A['dateend']);
    $event_templates->set_var('lang_enddate', $LANG12[13]);
    $event_templates->set_var('lang_endtime', $LANG_CAL_1[29]);
    $event_templates->set_var('lang_alldayevent', $LANG_CAL_1[31]);
    if ($A['allday'] == 1) {
        $event_templates->set_var('allday_checked', 'checked="checked"');
    }
    $event_templates->set_var('lang_location', $LANG12[51]);
    $event_templates->set_var('event_location', $A['location']);
    $event_templates->set_var('lang_addressline1', $LANG12[44]);
    $event_templates->set_var('event_address1', $A['address1']);
    $event_templates->set_var('lang_addressline2', $LANG12[45]);
    $event_templates->set_var('event_address2', $A['address2']);
    $event_templates->set_var('lang_city', $LANG12[46]);
    $event_templates->set_var('event_city', $A['city']);
    $event_templates->set_var('lang_state', $LANG12[47]);
    $event_templates->set_var('state_options', '');
    $event_templates->set_var('event_state', $A['state']);
    $event_templates->set_var('lang_zipcode', $LANG12[48]);
    $event_templates->set_var('event_zipcode', $A['zipcode']);
    $event_templates->set_var('lang_eventlocation', $LANG_CAL_ADMIN[7]);
    $event_templates->set_var('event_location', $A['location']);
    $event_templates->set_var('lang_eventdescription', $LANG_CAL_ADMIN[8]);
    $event_templates->set_var('event_description', $A['description']);
    $event_templates->set_var('lang_hits', $LANG10[30]);
    $event_templates->set_var('hits', COM_numberFormat($A['hits']));
    $event_templates->set_var('lang_save', $saveoption);
    $event_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    // user access info
    $event_templates->set_var('lang_accessrights', $LANG_ACCESS['accessrights']);
    $event_templates->set_var('lang_owner', $LANG_ACCESS['owner']);
    $ownername = COM_getDisplayName($A['owner_id']);
    $event_templates->set_var('owner_username', DB_getItem($_TABLES['users'], 'username', "uid = {$A['owner_id']}"));
    $event_templates->set_var('owner_name', $ownername);
    $event_templates->set_var('owner', $ownername);
    $event_templates->set_var('owner_id', $A['owner_id']);
    $event_templates->set_var('lang_group', $LANG_ACCESS['group']);
    $event_templates->set_var('group_dropdown', SEC_getGroupDropdown($A['group_id'], $access));
    $event_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
    $event_templates->set_var('lang_permissionskey', $LANG_ACCESS['permissionskey']);
    $event_templates->set_var('permissions_editor', SEC_getPermissionsHTML($A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']));
    $event_templates->set_var('gltoken_name', CSRF_TOKEN);
    $event_templates->set_var('gltoken', SEC_createToken());
    $event_templates->parse('output', 'editor');
    $retval .= $event_templates->finish($event_templates->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:101,代码来源:index.php

示例10: LIB_datetimeedit_R

function LIB_datetimeedit_R($datetime_ary, $lang, $datetime_name = "datetime")
{
    global $_CONF;
    $var = $lang;
    global ${$var};
    $lang_ary = ${$var};
    if (!is_array($datetime_ary)) {
        return "";
    }
    $rt = "";
    //Year
    $year_options = COM_getYearFormOptions($datetime_ary['year']);
    $rt .= "<select name=\"" . $datetime_name . "_year\">" . LB;
    $rt .= $year_options . LB;
    $rt .= "</select>" . $lang_ary['yy'] . LB;
    //month
    $month_options = COM_getMonthFormOptions($datetime_ary['month']);
    $rt .= "<select name=\"" . $datetime_name . "_month\">" . LB;
    $rt .= $month_options . LB;
    $rt .= "</select>" . $lang_ary['mm'] . LB;
    //day
    $day_options = COM_getDayFormOptions($datetime_ary['day']);
    $rt .= "<select name=\"" . $datetime_name . "_day\">" . LB;
    $rt .= $day_options . LB;
    $rt .= "</select>" . $lang_ary['dd'] . LB;
    //hour
    if ($datetime_ary['hour'] != "") {
        if ($_CONF['hour_mode'] == 24) {
            $hour_options = COM_getHourFormOptions($datetime_ary['hour'], 24);
        } else {
            $ampm_select = COM_getAmPmFormSelection($datetime_name . '_ampm', $datetime_ary['ampm']);
            if (empty($ampm_select)) {
                $ampm_select = '<input type="hidden" name="cmt_close_ampm" value=""' . XHTML . '>';
            }
            $rt .= $ampm_select;
            $hour_options = COM_getHourFormOptions($datetime_ary['hour']);
        }
        $rt .= "<select name=\"" . $datetime_name . "_hour\">" . LB;
        $rt .= $hour_options . LB;
        $rt .= "</select>:" . LB;
        //minute
        $minute_options = COM_getMinuteFormOptions($datetime_ary['minute']);
        $rt .= "<select name=\"" . $datetime_name . "_minute\">" . LB;
        $rt .= $minute_options . LB;
        $rt .= "</select>" . LB;
    }
    return $rt;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:48,代码来源:lib_datetimeedit.php

示例11: STORY_edit


//.........这里部分代码省略.........
        $story_templates->set_var('group_dropdown', $grpddown);
    }
    $story_templates->set_var('lang_permissions', $LANG_ACCESS['permissions']);
    $story_templates->set_var('lang_perm_key', $LANG_ACCESS['permissionskey']);
    $story_templates->set_var('permissions_editor', SEC_getPermissionsHTML($story->EditElements('perm_owner'), $story->EditElements('perm_group'), $story->EditElements('perm_members'), $story->EditElements('perm_anon')));
    $story_templates->set_var('permissions_msg', $LANG_ACCESS['permmsg']);
    $curtime = COM_getUserDateTimeFormat($story->EditElements('date'));
    $story_templates->set_var('lang_date', $LANG24[15]);
    $story_templates->set_var('publish_second', $story->EditElements('publish_second'));
    $publish_ampm = '';
    $publish_hour = $story->EditElements('publish_hour');
    if ($publish_hour >= 12) {
        if ($publish_hour > 12) {
            $publish_hour = $publish_hour - 12;
        }
        $ampm = 'pm';
    } else {
        $ampm = 'am';
    }
    $ampm_select = COM_getAmPmFormSelection('publish_ampm', $ampm);
    $story_templates->set_var('publishampm_selection', $ampm_select);
    $month_options = COM_getMonthFormOptions($story->EditElements('publish_month'));
    $story_templates->set_var('publish_month_options', $month_options);
    $day_options = COM_getDayFormOptions($story->EditElements('publish_day'));
    $story_templates->set_var('publish_day_options', $day_options);
    $year_options = COM_getYearFormOptions($story->EditElements('publish_year'));
    $story_templates->set_var('publish_year_options', $year_options);
    if ($_CONF['hour_mode'] == 24) {
        $hour_options = COM_getHourFormOptions($story->EditElements('publish_hour'), 24);
    } else {
        $hour_options = COM_getHourFormOptions($publish_hour);
    }
    $story_templates->set_var('publish_hour_options', $hour_options);
    $minute_options = COM_getMinuteFormOptions($story->EditElements('publish_minute'));
    $story_templates->set_var('publish_minute_options', $minute_options);
    $story_templates->set_var('publish_date_explanation', $LANG24[46]);
    $story_templates->set_var('story_unixstamp', $story->EditElements('unixdate'));
    $story_templates->set_var('expire_second', $story->EditElements('expire_second'));
    $expire_ampm = '';
    $expire_hour = $story->EditElements('expire_hour');
    if ($expire_hour >= 12) {
        if ($expire_hour > 12) {
            $expire_hour = $expire_hour - 12;
        }
        $ampm = 'pm';
    } else {
        $ampm = 'am';
    }
    $ampm_select = COM_getAmPmFormSelection('expire_ampm', $ampm);
    if (empty($ampm_select)) {
        // have a hidden field to 24 hour mode to prevent JavaScript errors
        $ampm_select = '<input type="hidden" name="expire_ampm" value=""/>';
    }
    $story_templates->set_var('expireampm_selection', $ampm_select);
    $month_options = COM_getMonthFormOptions($story->EditElements('expire_month'));
    $story_templates->set_var('expire_month_options', $month_options);
    $day_options = COM_getDayFormOptions($story->EditElements('expire_day'));
    $story_templates->set_var('expire_day_options', $day_options);
    $year_options = COM_getYearFormOptions($story->EditElements('expire_year'));
    $story_templates->set_var('expire_year_options', $year_options);
    if ($_CONF['hour_mode'] == 24) {
        $hour_options = COM_getHourFormOptions($story->EditElements('expire_hour'), 24);
    } else {
        $hour_options = COM_getHourFormOptions($expire_hour);
    }
    $story_templates->set_var('expire_hour_options', $hour_options);
开发者ID:spacequad,项目名称:glfusion,代码行数:67,代码来源:story.php

示例12: fncEdit


//.........这里部分代码省略.........
    $list_introbody = assist_getradiolist($LANG_ASSIST_INTROBODY, "introbody", $introbody);
    $templates->set_var('list_introbody', $list_introbody);
    //送信先環境
    $templates->set_var('lang_toenv', $LANG_ASSIST_ADMIN['toenv']);
    $list_toenv = assist_getradiolist($LANG_ASSIST_TOENV, "toenv", $toenv);
    $templates->set_var('list_toenv', $list_toenv);
    //送信先グループ
    $thisUsersGroups = SEC_getUserGroups();
    uksort($thisUsersGroups, 'strcasecmp');
    $optionlist_selectgroup = '';
    if ($wkymlmguserflg == true) {
        $optionlist_selectgroup .= '<option value="' . 99999 . '"';
        if ($selectgroup > 0 && $selectgroup == "99999") {
            $optionlist_selectgroup .= ' selected="selected"';
        }
        $optionlist_selectgroup .= '>' . $LANG_ASSIST_ADMIN['wkymlmguser_user'] . '</option>' . LB;
    }
    foreach ($thisUsersGroups as $groupName => $groupID) {
        if ($groupName != 'All Users') {
            $optionlist_selectgroup .= '<option value="' . $groupID . '"';
            if ($selectgroup > 0 && $selectgroup == $groupID) {
                $optionlist_selectgroup .= ' selected="selected"';
            }
            $optionlist_selectgroup .= '>' . ucwords($groupName) . '</option>' . LB;
        }
    }
    $templates->set_var('lang_selectgroup', $LANG_ASSIST_ADMIN['selectgroup']);
    $templates->set_var('optionlist_selectgroup', $optionlist_selectgroup);
    // ユーザの受信許可設定を無視して送る
    $templates->set_var('lang_overstyr', $LANG31['14']);
    if ($overstyr == 0) {
        $templates->set_var('is_checked_overstyr', '');
    } else {
        $templates->set_var('is_checked_overstyr', 'checked="checked"');
    }
    //testto
    $templates->set_var('lang_testto', $LANG_ASSIST_ADMIN['testto']);
    $templates->set_var('testto', $testto);
    //uidfrom-to
    $templates->set_var('lang_sendto', $LANG_ASSIST_ADMIN['sendto']);
    $templates->set_var('lang_uidfrom', $LANG_ASSIST_ADMIN['uidfrom']);
    $templates->set_var('uidfrom', $uidfrom);
    $templates->set_var('lang_uidto', $LANG_ASSIST_ADMIN['uidto']);
    $templates->set_var('uidto', $uidto);
    $templates->set_var('lang_sendto_remarks', $LANG_ASSIST_ADMIN['sendto_remarks']);
    if ($wkymlmguserflg == true) {
        $templates->set_var('user_wkymlmguser', $LANG_ASSIST_ADMIN['wkymlmguser_on']);
    } else {
        $templates->set_var('user_wkymlmguser', $LANG_ASSIST_ADMIN['wkymlmguser_off']);
    }
    // hiroron start 2010/07/13
    if ($datetime_value === "") {
        $datetime_value = time();
    }
    $datetime_month = date('m', $datetime_value);
    $datetime_day = date('d', $datetime_value);
    $datetime_year = date('Y', $datetime_value);
    $datetime_hour = date('H', $datetime_value);
    $datetime_minute = date('i', $datetime_value);
    $month_options = COM_getMonthFormOptions($datetime_month);
    $day_options = COM_getDayFormOptions($datetime_day);
    $year_options = COM_getYearFormOptions($datetime_year);
    $hour_options = COM_getHourFormOptions($datetime_hour, 24);
    $minute_options = COM_getMinuteFormOptions($datetime_minute);
    $templates->set_var('lang_reserv_datetime', $LANG_ASSIST_ADMIN['reserv_datetime']);
    $templates->set_var('datetime', 'datetime');
    $templates->set_var('datetime_year_options', $year_options);
    $templates->set_var('datetime_month_options', $month_options);
    $templates->set_var('datetime_day_options', $day_options);
    $templates->set_var('datetime_hour_options', $hour_options);
    $templates->set_var('datetime_minute_options', $minute_options);
    $templates->set_var('lang_yy', $LANG_ASSIST_ADMIN['yy']);
    $templates->set_var('lang_mm', $LANG_ASSIST_ADMIN['mm']);
    $templates->set_var('lang_dd', $LANG_ASSIST_ADMIN['dd']);
    // hiroron end 2010/07/13
    $templates->set_var('lang_reserv_datetime_remarks', $LANG_ASSIST_ADMIN['reserv_datetime_remarks']);
    //予約送信
    //$templates->set_var( 'lang_bulkbooking', $LANG_ASSIST_ADMIN['mail_bulkbooking']);
    $templates->set_var('minute', $LANG_ASSIST_ADMIN['minute']);
    $templates->set_var('every', $LANG_ASSIST_ADMIN['every']);
    $templates->set_var('increments', $LANG_ASSIST_ADMIN['increments']);
    $templates->set_var('bulkmm', $bulkmm);
    $templates->set_var('bulkcnt', $bulkcnt);
    // SAVE、CANCEL ボタン
    $templates->set_var('lang_save', $LANG_ADMIN['save']);
    $templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
    $templates->set_var('lang_testsend', $LANG_ASSIST_ADMIN['mail_test']);
    $templates->set_var('lang_send', $LANG_ASSIST_ADMIN['mail_send']);
    // hiroron start 2010/07/13
    $templates->set_var('lang_reserv', $LANG_ASSIST_ADMIN['mail_reserv']);
    // hiroron end 2010/07/13
    // hiroron start 2010/07/15
    $templates->set_var('list_reserv', fncListReserv());
    // hiroron end 2010/07/15
    //
    $templates->parse('output', 'editor');
    $retval .= $templates->finish($templates->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:101,代码来源:newsletter.php

示例13: showEditor


//.........这里部分代码省略.........
     }
     $T->set_var('show_texteditor', $show_texteditor);
     $T->set_var('show_htmleditor', $show_htmleditor);
     $T->set_var('post_options', $post_options);
     $T->set_var('action', $action);
     $T->set_var('op', $op);
     $T->set_var('lid', $this->_lid);
     $T->set_var('old_lid', $this->_old_lid);
     $T->set_var('pathstring', $pathstring);
     $T->set_var('title', $this->_title);
     $T->set_var('url', $this->_url);
     $T->set_var('homepage', $this->_homepage);
     $T->set_var('version', $this->_version);
     $T->set_var('size', $this->_size);
     $T->set_var('md5', $this->_md5);
     $T->set_var('logourl', $this->_logourl);
     $T->set_var('mg_autotag', $this->_mg_autotag);
     $T->set_var('tags', $this->_tags);
     $T->set_var('description', $description);
     $T->set_var('detail', $detail);
     $T->set_var('project', $this->_project);
     $T->set_var('snapstore_url', $_DLM_CONF['snapstore_url']);
     $T->set_var('categorylist', $categorylist);
     $T->set_var('val_is_released_1', $this->_is_released ? UC_SELECTED : '');
     $T->set_var('val_is_released_0', !$this->_is_released ? UC_SELECTED : '');
     $T->set_var('val_is_listing_1', $this->_is_listing ? UC_SELECTED : '');
     $T->set_var('val_is_listing_0', !$this->_is_listing ? UC_SELECTED : '');
     $T->set_var('shot_autotag', $this->_makeForm_shot_mg_autotag());
     $T->set_var('shot', $this->_makeForm_shot());
     $T->set_var('year_options', COM_getYearFormOptions($year));
     $T->set_var('month_options', DLM_getMonthFormOptions($month));
     $T->set_var('day_options', COM_getDayFormOptions($day));
     $T->set_var('hour_options', COM_getHourFormOptions($hour, 24));
     $T->set_var('minute_options', COM_getMinuteFormOptions($minute, 1));
     $T->set_var('second_options', COM_getMinuteFormOptions($second, 1));
     $T->set_var('old_date', $this->_date);
     $T->set_var('comment_options', COM_optionList($_TABLES['commentcodes'], 'code,name', $this->_commentcode));
     $T->set_var('gltoken_name', CSRF_TOKEN);
     $T->set_var('gltoken', SEC_createToken());
     $T->set_var('submitter', $this->_owner_id);
     $T->set_var('displayName', COM_getDisplayName($this->_owner_id));
     if ($mode == 'submit') {
         $T->set_var('lang_commentoption', $LANG_DLM['commentoption']);
         $T->set_var('val_commentoption_1', UC_SELECTED);
         $T->set_var('val_commentoption_0', '');
     }
     $T->parse('mod_submitter', 't_mod_submitter');
     if ($mode == 'editsubmission' || $mode == 'submit') {
         $T->set_var('mod_mg_autotag', '');
         $hidden_values .= $this->_makeForm_hidden('mg_autotag', $this->_mg_autotag);
     } else {
         if ($_DLM_CONF['enabled_mg_autotag'] == 1) {
             $T->parse('mod_mg_autotag', 't_mod_mg_autotag');
         } else {
             $T->set_var('mod_mg_autotag', '');
             $hidden_values .= $this->_makeForm_hidden('mg_autotag', $this->_mg_autotag);
         }
     }
     $T->set_var('hidden_values', $hidden_values);
     if ($mode == 'edit' || $mode == 'clone') {
         $T->parse('mod_newfile', 't_mod_newfile');
         $T->parse('mod_newfileshot', 't_mod_newfileshot');
         if ($mode == 'edit') {
             $T->parse('mod_submit_delete', 't_mod_submit_delete');
         }
         $T->parse('mod_submit_cancel', 't_mod_submit_cancel');
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:67,代码来源:download.class.php


注:本文中的COM_getMinuteFormOptions函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。