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


PHP CTitleBlock::show方法代码示例

本文整理汇总了PHP中CTitleBlock::show方法的典型用法代码示例。如果您正苦于以下问题:PHP CTitleBlock::show方法的具体用法?PHP CTitleBlock::show怎么用?PHP CTitleBlock::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTitleBlock的用法示例。


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

示例1: clash_suggest

function clash_suggest(CAppUI $AppUI, $cal_sdf)
{
    global $m, $a;
    $obj = new CEvent();
    $obj->bind($_SESSION['add_event_post']);
    $start_date = new w2p_Utilities_Date($obj->event_start_date);
    $end_date = new w2p_Utilities_Date($obj->event_end_date);
    $df = $AppUI->getPref('SHDATEFORMAT');
    $start_secs = $start_date->getTime();
    $end_secs = $end_date->getTime();
    $duration = (int) (($end_secs - $start_secs) / 60);
    $titleBlock = new CTitleBlock('Suggest Alternative Event Time', 'myevo-appointments.png', $m, $m . '.' . $a);
    $titleBlock->show();
    $calurl = W2P_BASE_URL . '/index.php?m=calendar&a=clash&event_id=' . $obj->event_id;
    $times = array();
    $t = new w2p_Utilities_Date();
    $t->setTime(0, 0, 0);
    if (!defined('LOCALE_TIME_FORMAT')) {
        define('LOCALE_TIME_FORMAT', '%I:%M %p');
    }
    for ($m = 0; $m < 60; $m++) {
        $times[$t->format('%H%M%S')] = $t->format(LOCALE_TIME_FORMAT);
        $t->addSeconds(1800);
    }
    ?>
    <script language="javascript" type="text/javascript">
    function setDate( frm_name, f_date ) {
        fld_date = eval( 'document.' + frm_name + '.' + f_date );
        fld_real_date = eval( 'document.' + frm_name + '.' + 'event_' + f_date );
        if (fld_date.value.length>0) {
          if ((parseDate(fld_date.value))==null) {
                alert('The Date/Time you typed does not match your prefered format, please retype.');
                fld_real_date.value = '';
                fld_date.style.backgroundColor = 'red';
            } else {
                fld_real_date.value = formatDate(parseDate(fld_date.value), 'yyyyMMdd');
                fld_date.value = formatDate(parseDate(fld_date.value), '<?php 
    echo $cal_sdf;
    ?>
');
                fld_date.style.backgroundColor = '';
            }
        } else {
            fld_real_date.value = '';
        }
    }

    function set_clash_action(action) {
        document.editFrm.clash_action.value = action;
        document.editFrm.submit();
    }

    </script>
    <form name="editFrm" method="post" action="<?php 
    echo $calurl . '&clash_action=process';
    ?>
" accept-charset="utf-8">
    <table width='100%' class='std'>
    <tr>
      <td width='50%' align='right'><?php 
    echo $AppUI->_('Earliest Date');
    ?>
:</td>
      <td width='50%' align='left' nowrap="nowrap">
        <input type="hidden" name="event_start_date" id="event_start_date" value="<?php 
    echo $start_date ? $start_date->format(FMT_TIMESTAMP_DATE) : '';
    ?>
" />
        <input type="text" name="start_date" id="start_date" onchange="setDate('editFrm', 'start_date');" value="<?php 
    echo $start_date ? $start_date->format($df) : '';
    ?>
" class="text" />
        <a href="javascript: void(0);" onclick="return showCalendar('start_date', '<?php 
    echo $df;
    ?>
', 'editFrm', null, true)">
        <img src="<?php 
    echo w2PfindImage('calendar.gif');
    ?>
" width="24" height="12" alt="<?php 
    echo $AppUI->_('Calendar');
    ?>
" border="0" />
          </a>
      </td>
    </tr>
    <tr>
      <td width='50%' align='right'><?php 
    echo $AppUI->_('Latest Date');
    ?>
:</td>
      <td width='50%' align='left' nowrap="nowrap">
        <input type="hidden" name="event_end_date" id="event_end_date" value="<?php 
    echo $end_date ? $end_date->format(FMT_TIMESTAMP_DATE) : '';
    ?>
" />
        <input type="text" name="end_date" id="end_date" onchange="setDate('editFrm', 'end_date');" value="<?php 
    echo $end_date ? $end_date->format($df) : '';
    ?>
" class="text" />
//.........这里部分代码省略.........
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:101,代码来源:clash.php

示例2: submitIt

$q = new DBQuery();
$q->addTable('users', 'u');
$q->addTable('contacts', 'con');
$q->addQuery('user_id');
$q->addQuery('CONCAT_WS(", ",contact_last_name,contact_first_name)');
$q->addOrder('contact_last_name');
$q->addWhere('u.user_contact = con.contact_id');
$owners = $q->loadHashList();
// setup the title block
$ttl = $company_id > 0 ? "Edit Company" : "Add Company";
$titleBlock = new CTitleBlock($ttl, 'handshake.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb("?m=companies", "companies list");
if ($company_id != 0) {
    $titleBlock->addCrumb("?m=companies&a=view&company_id={$company_id}", "view this company");
}
$titleBlock->show();
?>

<script language="javascript">
function submitIt() {
	var form = document.changeclient;
	if (form.company_name.value.length < 3) {
		alert( "<?php 
echo $AppUI->_('companyValidName', UI_OUTPUT_JS);
?>
" );
		form.company_name.focus();
	} else {
		form.submit();
	}
}
开发者ID:kaz190,项目名称:dotproject,代码行数:31,代码来源:addedit.php

示例3: clash_suggest

function clash_suggest()
{
    global $AppUI, $m, $a;
    $obj = new CEvent();
    $obj->bind($_SESSION['add_event_post']);
    $start_date = new CDate($obj->event_start_date);
    $end_date = new CDate($obj->event_end_date);
    $df = $AppUI->getPref('SHDATEFORMAT');
    $start_secs = $start_date->getTime();
    $end_secs = $end_date->getTime();
    $duration = (int) (($end_secs - $start_secs) / 60);
    $titleBlock = new CTitleBlock('Suggest Alternative Event Time', 'myevo-appointments.png', $m, "{$m}.{$a}");
    $titleBlock->show();
    $calurl = DP_BASE_URL . '/index.php?m=calendar&a=clash&event_id=' . $obj->event_id;
    $inc = intval(dPgetConfig('cal_day_increment')) ? intval(dPgetConfig('cal_day_increment')) : 30;
    $times = array();
    $t = new CDate();
    $t->setTime(0, 0, 0);
    //$m clashes with global $m (module)
    $check = 24 * 60 / $inc;
    $addMins = $inc * 60;
    for ($minutes = 0; $minutes < $check; $minutes++) {
        $times[$t->format('%H%M%S')] = $t->format($AppUI->getPref('TIMEFORMAT'));
        $t->addSeconds($addMins);
    }
    ?>
<script type="text/javascript" language="javascript">
var calendarField = '';

function popCalendar(field) {
	calendarField = field;
	idate = eval('document.editFrm.event_' + field + '.value');
	window.open('?m=public&a=calendar&dialog=1&callback=setCalendar&date=' + idate, 'calwin', 'top=250,left=250,width=250, height=220, scrollbars=no, status=no');
}

/**
 *	@param string Input date in the format YYYYMMDD
 *	@param string Formatted date
 */
function setCalendar(idate, fdate) {
	fld_date = eval('document.editFrm.event_' + calendarField);
	fld_fdate = eval('document.editFrm.' + calendarField);
	fld_date.value = idate;
	fld_fdate.value = fdate;
}

function set_clash_action(action) {
	document.editFrm.clash_action.value = action;
	document.editFrm.submit();
}

</script>
<form name='editFrm' method='POST' action='<?php 
    echo "{$calurl}&clash_action=process";
    ?>
'>
<table width='100%' class='std'>
<tr>
  <td width='50%' align='right'><?php 
    echo $AppUI->_('Earliest Date');
    ?>
:</td>
  <td width='50%' align='left' nowrap="nowrap">
    <input type="hidden" name="event_start_date" value="<?php 
    echo $start_date->format(FMT_TIMESTAMP_DATE);
    ?>
" />
    <input type="text" name="start_date" value="<?php 
    echo $start_date->format($df);
    ?>
" class="text" disabled="disabled" />
      <a href="#" onclick="javascript:popCalendar('start_date')">
	<img src="./images/calendar.gif" width="24" height="12" alt="<?php 
    echo $AppUI->_('Calendar');
    ?>
" border="0" />
      </a>
  </td>
</tr>
<tr>
  <td width='50%' align='right'><?php 
    echo $AppUI->_('Latest Date');
    ?>
:</td>
  <td width='50%' align='left' nowrap="nowrap">
    <input type="hidden" name="event_end_date" value="<?php 
    echo $end_date->format(FMT_TIMESTAMP_DATE);
    ?>
" />
    <input type="text" name="end_date" value="<?php 
    echo $end_date->format($df);
    ?>
" class="text" disabled="disabled" />
      <a href="#" onclick="javascript:popCalendar('end_date')">
	<img src="./images/calendar.gif" width="24" height="12" alt="<?php 
    echo $AppUI->_('Calendar');
    ?>
" border="0" />
      </a>
  </td>
//.........这里部分代码省略.........
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:101,代码来源:clash.php


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