예제 #1
0
파일: ink.php 프로젝트: mark2me/pressform
function write_ink_definitions()
{
    global $wpdb, $table_prefix;
    $table = $table_prefix . 'ink';
    $theme = get_option('template');
    $css = '/* CSS Generated by Ink - http://freshpursuits.com/ink */' . "\n\n";
    if ($values = $wpdb->get_results("SELECT * FROM " . $table . " WHERE theme = '{$theme}'")) {
        foreach ($values as $value) {
            $definitions = php4_clone($value);
            unset($definitions->element, $definitions->element_id, $definitions->theme);
            foreach ($definitions as $index => $definition) {
                if (!empty($definition)) {
                    $css .= ink_create_css($value->element, $index, $definition);
                }
            }
        }
        update_option('ink_css', '<style type="text/css" media="screen">' . "\n" . $css . '</style>');
    }
}
예제 #2
0
파일: day_view.php 프로젝트: n2i/xvnkb
// get the passed timestamp (today if none)
$ctoday = new CDate();
$today = $ctoday->format(FMT_TIMESTAMP_DATE);
$date = dPgetParam($_GET, 'date', $today);
// establish the focus 'date'
$this_day = new CDate($date);
$dd = $this_day->getDay();
$mm = $this_day->getMonth();
$yy = $this_day->getYear();
// get current week
$this_week = Date_calc::beginOfWeek($dd, $mm, $yy, FMT_TIMESTAMP_DATE, LOCALE_FIRST_DAY);
// prepare time period for 'events'
$first_time = php4_clone($this_day);
$first_time->setTime(0, 0, 0);
$first_time->subtractSeconds(1);
$last_time = php4_clone($this_day);
$last_time->setTime(23, 59, 59);
$prev_day = new CDate(Date_calc::prevDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE));
$next_day = new CDate(Date_calc::nextDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE));
// setup the title block
$titleBlock = new CTitleBlock('Day View');
$titleBlock->addButton('month view', 'index.php?m=calendar&date=' . $this_day->format(FMT_TIMESTAMP_DATE));
$titleBlock->addButton('week view', 'index.php?m=calendar&a=week_view&date=' . $this_week);
$titleBlock->addButton('new event', 'index.php?m=calendar&a=addedit&date=' . $this_day->format(FMT_TIMESTAMP_DATE));
$titleBlock->addCell();
$titleBlock->show();
?>
<script language="javascript">
function clickDay( idate, fdate ) {
        window.location = './index.php?m=calendar&a=day_view&date='+idate;
}
예제 #3
0
파일: viewgantt.php 프로젝트: n2i/xvnkb
$new_end = php4_clone($end_date);
$new_start->addMonths(-$scroll_date);
$new_end->addMonths(-$scroll_date);
echo "f.sdate.value='" . $new_start->format(FMT_TIMESTAMP_DATE) . "';";
echo "f.edate.value='" . $new_end->format(FMT_TIMESTAMP_DATE) . "';";
?>
	document.editFrm.display_option.value = 'custom';
	f.submit()
}

function scrollNext() {
	f = document.editFrm;
<?php 
$new_start = php4_clone($start_date);
$new_start->day = 1;
$new_end = php4_clone($end_date);
$new_start->addMonths($scroll_date);
$new_end->addMonths($scroll_date);
echo "f.sdate.value='" . $new_start->format(FMT_TIMESTAMP_DATE) . "';";
echo "f.edate.value='" . $new_end->format(FMT_TIMESTAMP_DATE) . "';";
?>
	document.editFrm.display_option.value = 'custom';
	f.submit()
}

function showThisMonth() {
	document.editFrm.display_option.value = "this_month";
	document.editFrm.submit();
}

function showFullProject() {
예제 #4
0
 function getEmailTemplate($id)
 {
     static $templates;
     if (!isset($templates[$id])) {
         $db = JFactory::getDBO();
         $nativeEmailTemplate = NotificationsManager::getNativeEmailTemplate($id);
         if ($nativeEmailTemplate) {
             $row = new stdClass();
             $row->id = $nativeEmailTemplate->id;
             $row->name = isset($nativeEmailTemplate->name) ? $nativeEmailTemplate->name : '';
             $row->subject = isset($nativeEmailTemplate->subject) ? $nativeEmailTemplate->subject : '';
             $row->template_html = $nativeEmailTemplate->template_html;
             $row->template_alt_text = isset($nativeEmailTemplate->template_alt_text) ? $nativeEmailTemplate->template_alt_text : '';
             $row->disabled = false;
             $row->native = true;
             $row->notification_type = $nativeEmailTemplate->notification_type;
         } else {
             $sql = "SELECT id, name, body_html AS template_html, body_text AS template_alt_text, notification_type, subject, disabled, '0' AS native FROM #__lms_email_templates WHERE id = '" . $id . "'";
             $db->setQuery($sql);
             $row = $db->loadObject();
         }
         $templates[$id] = $row;
     }
     return php4_clone($templates[$id]);
 }