本文整理汇总了PHP中get_form_header函数的典型用法代码示例。如果您正苦于以下问题:PHP get_form_header函数的具体用法?PHP get_form_header怎么用?PHP get_form_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_form_header函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: process_page
/**
*
*/
function process_page()
{
global $theme;
global $mod_strings;
global $app_strings;
global $currentModule;
global $sugar_version, $sugar_config;
$output_html = '';
$where = '';
$where = $this->_get_where_clause();
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
$user_name = empty($_REQUEST['user_name']) ? '' : $_REQUEST['user_name'];
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
if (!$hide_clear_button) {
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' />\n";
}
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CANCEL_BUTTON_KEY'] . "' value=' " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . " ' />\n";
$button .= "</form>\n";
$form = new XTemplate('modules/Employees/Popup_picker.html');
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', $theme);
$form->assign('MODULE_NAME', $currentModule);
$form->assign('FIRST_NAME', $first_name);
$form->assign('LAST_NAME', $last_name);
$form->assign('USER_NAME', $user_name);
$form->assign('request_data', $request_data);
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
// Reset the sections that are already in the page so that they do not print again later.
$form->reset('main.SearchHeader');
// create the listview
$seed_bean = BeanFactory::getBean('Employees');
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'user_name', 'EMPLOYEE');
$ListView->setModStrings($mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'EMPLOYEE');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= insert_popup_footer();
return $output_html;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:59,代码来源:Popup_picker.php
示例2: buildTableForm
function buildTableForm($rows, $mod = '')
{
global $odd_bg, $even_bg;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupFeed'><input type='hidden' name='selectedFeed' value=''>";
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr class='listViewThS1'>\t<td class='listViewThS1'> </td>";
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td scope='col' class='listViewThS1'>" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$bgcolor = $odd_bg;
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}' bgcolor='{$bgcolor}'>";
$form .= "<td width='1%' bgcolor='{$bgcolor}' nowrap ><a href='#' onClick=\"document.dupFeeds.selectedFeed.value='{$row['id']}';document.dupFeeds.submit() \">[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>";
$wasSet = false;
foreach ($row as $key => $value) {
if ($key != 'id') {
if (!$wasSet) {
$form .= "<td scope='row' class='{$rowColor}' bgcolor='{$bgcolor}'><a target='_blank' href='index.php?module=Feeds&action=DetailView&record={$row['id']}'>{$value}</a></td>";
$wasSet = true;
} else {
$form .= "<td class='{$rowColor}' bgcolor='{$bgcolor}'><a target='_blank' href='index.php?module=Feeds&action=DetailView&record={$row['id']}'>{$value}</a></td>";
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
$bgcolor = $odd_bg;
} else {
$rowColor = 'evenListRowS1';
$bgcolor = $even_bg;
}
$form .= "</tr>";
}
$form .= "<tr class='listViewThS1'><td colspan='{$cols}' class='blackline'></td></tr>";
$form .= "</table><br><input type='submit' class='button' name='ContinueFeed' value='{$app_strings['LBL_CREATE_BUTTON_LABEL']} {$mod_strings['LNK_NEW_CONTACT']}'></form>";
return $form;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:54,代码来源:FeedFormBase.php
示例3: display
/**
* display the form
*/
public function display()
{
global $db, $timedate, $current_language;
parent::display();
$index = BeanFactory::getBean("AOD_Index");
$index = $index->getIndex();
$beanList = $index->getIndexableModules();
$moduleCounts = array();
foreach ($beanList as $beanModule => $beanName) {
$bean = BeanFactory::getBean($beanModule);
if (!$bean || !method_exists($bean, "getTableName") || !$bean->getTableName()) {
continue;
}
$query = "SELECT COUNT(DISTINCT b.id) FROM " . $bean->getTableName() . " b WHERE b.deleted = 0";
$moduleCounts[$beanModule] = $db->getOne($query);
}
$revisionCount = array_sum($moduleCounts);
$indexedCount = $db->getOne("SELECT COUNT(*) FROM aod_indexevent WHERE deleted = 0 AND success = 1");
$failedCount = $db->getOne("SELECT COUNT(*) FROM aod_indexevent WHERE deleted = 0 AND success = 0");
$indexFiles = count(glob($index->location . "/*.cfs"));
$this->ss->assign("revisionCount", $revisionCount);
$this->ss->assign("indexedCount", $indexedCount);
$this->ss->assign("failedCount", $failedCount);
$this->ss->assign("index", $index);
$this->ss->assign("indexFiles", $indexFiles);
echo $this->ss->fetch('modules/AOD_Index/tpls/indexdata.tpl');
if ($failedCount) {
$seed = BeanFactory::newBean("AOD_IndexEvent");
$lv = new ListViewSmarty();
$lv->lvd->additionalDetails = false;
$mod_strings = return_module_language($current_language, $seed->module_dir);
require 'modules/' . $seed->module_dir . '/metadata/listviewdefs.php';
if (file_exists('custom/modules/' . $seed->module_dir . '/metadata/listviewdefs.php')) {
require 'custom/modules/' . $seed->module_dir . '/metadata/listviewdefs.php';
}
$lv->displayColumns = $listViewDefs[$seed->module_dir];
$lv->quickViewLinks = false;
$lv->export = false;
$lv->mergeduplicates = false;
$lv->multiSelect = false;
$lv->delete = false;
$lv->select = false;
$lv->showMassupdateFields = false;
$lv->email = false;
$lv->setup($seed, 'include/ListView/ListViewNoMassUpdate.tpl', 'success = 0', '', 0, 10);
echo '<br /><br />' . get_form_header($GLOBALS['mod_strings']['LBL_FAILED_RECORDS'] . ' (' . $lv->data['pageData']['offsets']['total'] . ')', '', false);
if ($lv->data['pageData']['offsets']['total'] == 0) {
echo "No data";
} else {
echo $lv->display();
}
}
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:56,代码来源:view.indexdata.php
示例4: listViewProcess
function listViewProcess()
{
$this->processSearchForm();
$this->lv->searchColumns = $this->searchForm->searchColumns;
if (!$this->headers) {
return;
}
if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false) {
$this->lv->setup($this->seed, 'include/ListView/ListViewGeneric.tpl', $this->where, $this->params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name'];
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
echo $this->lv->display();
}
}
开发者ID:klr2003,项目名称:sourceread,代码行数:14,代码来源:view.list.php
示例5: testget_form_header
public function testget_form_header()
{
error_reporting(E_ERROR | E_PARSE);
//execute the method and test if it returns html and contains the values provided in parameters
//help param true
$html1 = get_form_header('test Header', 'test subheader', true);
$this->assertGreaterThan(0, strlen($html1));
$this->assertContains('test Header', $html1);
$this->assertContains('test subheader', $html1);
// help param false
$html2 = get_form_header('new test Header', 'new test subheader', false);
$this->assertGreaterThan(0, strlen($html2));
$this->assertContains('new test Header', $html2);
$this->assertContains('new test subheader', $html2);
$this->assertGreaterThan(strlen($html2), strlen($html1));
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:16,代码来源:layoutUtilsTest.php
示例6: buildTableForm
function buildTableForm($rows, $mod = 'Quotes')
{
if (!ACLController::checkAccess('Quotes', 'edit', true)) {
return '';
}
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedQuote' value=''>";
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr >\t<td ></TD>";
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td >" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'><td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedQuote.value=\"{$row['id']}\";document.dupOpps.submit();'>[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>";
foreach ($row as $key => $value) {
if ($key != 'id') {
$form .= "<td><a target='_blank' href='index.php?module=Quotes&action=DetailView&record={$row['id']}'>{$value}</a></td>";
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr ><td colspan='{$cols}' class='blackline'></td></tr>";
$form .= "</table><BR><input type='submit' class='button' name='ContinueQuote' value='{$app_strings['LBL_CREATE_BUTTON_LABEL']} {$mod_strings['LNK_NEW_QUOTE']}'></form>";
return $form;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:46,代码来源:QuoteFormBase.php
示例7: listViewProcess
function listViewProcess()
{
$this->processSearchForm();
$this->lv->searchColumns = $this->searchForm->searchColumns;
if (!$this->headers) {
return;
}
if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false) {
$this->lv->setup($this->seed, 'modules/Contracts/tpls/ListViewGeneric.tpl', $this->where, $this->params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name'];
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
/**
* added by Hoc Bui
*
* @var OpportunitiesViewList
*/
$filter_fields = array();
$orderBy = "";
$ret_array = $this->seed->create_new_list_query($orderBy, $this->where, $filter_fields, $this->params, 0, '', true, $this->seed, true);
$main_query = $ret_array['select'] . $params['custom_select'] . $ret_array['from'] . $params['custom_from'] . $ret_array['inner_join'] . $ret_array['where'] . $params['custom_where'] . $ret_array['order_by'] . $params['custom_order_by'];
//print_r($ret_array);
//exit;
/*$query = "SELECT amount_usdollar,amount, deleted FROM opportunities " ;
if($this->where)
$query .= "WHERE ".$this->where;*/
global $db;
$result = $db->query($main_query);
$i = 0;
$total = 0;
while (($row = $db->fetchByAssoc($result)) != null) {
if ($row['deleted'] != 1) {
$total += $row['tongtien'];
}
$i++;
}
// $this->lv->ss->assign("total", currency_format_number($GLOBALS['ESCOppAmount'])) ;
$this->lv->ss->assign("total", currency_format_number($total));
/**
* end Hoc Bui
*
* @var OpportunitiesViewList
*/
echo $this->lv->display();
//echo currency_format_number($GLOBALS['ESCOppAmount']);
}
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:46,代码来源:view.list.php
示例8: process_page
/**
*
*/
function process_page()
{
global $theme;
global $mod_strings;
global $app_strings;
global $currentModule;
global $image_path;
$output_html = '';
$where = '';
$where = $this->_get_where_clause();
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
$button = '';
$form = new XTemplate('modules/ACLRoles/ListView.html');
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', $theme);
$form->assign('MODULE_NAME', $currentModule);
$form->assign('NAME', $name);
$form->assign('request_data', $request_data);
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
$output_html .= get_form_footer();
// Reset the sections that are already in the page so that they do not print again later.
$form->reset('main.SearchHeader');
// create the listview
$seed_bean = new ACLRole();
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($mod_strings['LBL_ROLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'name', 'ROLE');
$ListView->setModStrings($mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'ROLE');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_footer();
$output_html .= insert_popup_footer();
return $output_html;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:48,代码来源:ListView.php
示例9: listViewProcess
function listViewProcess()
{
$this->processSearchForm();
$this->lv->searchColumns = $this->searchForm->searchColumns;
if ($this->where != "") {
$this->where .= ' and oqc_externalcontract.is_latest !=0';
} else {
$this->where .= 'oqc_externalcontract.is_latest !=0';
}
if (!$this->headers) {
return;
}
global $sugar_version;
if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false) {
if (0 < strpos($this->where, 'oqc_externalcontract.name like') && FALSE === strpos($this->where, 'oqc_externalcontract.description like')) {
// if someone searched for a title and entered no description to search for, we will expand the sql statement to make sure name and description of contract are searched automatically.
$this->where = preg_replace('/oqc_externalcontract.name like \'(.*?)\'/', 'oqc_externalcontract.name like \'\\1\' or oqc_externalcontract.description like \'\\1\'', $this->where);
}
// search for contracts ending not later than enddate
if (isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'basic_search') {
$this->where = preg_replace('/oqc_externalcontract.enddate >=/', 'oqc_externalcontract.enddate <=', $this->where);
}
if (floatval(substr($sugar_version, 0, 3)) > 6.4) {
$this->lv->setup($this->seed, 'modules/oqc_ExternalContract/views/ListView65.tpl', $this->where, $this->params);
} elseif (floatval(substr($sugar_version, 0, 3)) > 6.3) {
$this->lv->setup($this->seed, 'modules/oqc_ExternalContract/views/ListView64.tpl', $this->where, $this->params);
} elseif (floatval(substr($sugar_version, 0, 3)) >= 6.0 && floatval(substr($sugar_version, 0, 3)) <= 6.3) {
$this->lv->setup($this->seed, 'modules/oqc_ExternalContract/views/ListView.tpl', $this->where, $this->params);
} else {
$this->lv->setup($this->seed, 'modules/oqc_ExternalContract/views/ListView52.tpl', $this->where, $this->params);
}
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name'];
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
echo $this->lv->display();
}
}
开发者ID:santara12,项目名称:OpenQuotesAndContracts,代码行数:36,代码来源:view.list.php
示例10: implode
if (count($where_clauses) > 0) {
$where = implode(' and ', $where_clauses);
}
$GLOBALS['log']->info("Here is the where clause for the list view: {$where}");
}
// start display
// which tab of search form to display
if (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
$searchForm->setup();
if (isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
$searchForm->displayAdvanced();
} elseif (isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'saved_views') {
$searchForm->displaySavedViews($listViewDefs, $lv);
} else {
$searchForm->displayBasic();
}
}
echo $qsd->GetQSScripts();
$lv->setup($seedProducts, 'include/ListView/ListViewGeneric.tpl', $where, $params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name'];
echo get_form_header($current_module_strings['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
echo $lv->display();
$savedSearch = new SavedSearch();
$json = getJSONobj();
// fills in saved views select box on shortcut menu
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('Products')));
$str = "<script>\nYAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, {$savedSearchSelects});\n</script>";
echo $str;
?>
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:29,代码来源:ListView.php
示例11: draw
function draw($extra_tools)
{
global $app_list_strings, $current_language, $sugar_config, $currentModule, $action, $theme;
$current_module_strings = return_module_language($current_language, 'Charts');
if (isset($_REQUEST['obm_refresh'])) {
$refresh = $_REQUEST['obm_refresh'];
} else {
$refresh = false;
}
$date_start = array();
$datax = array();
//get the dates to display
global $current_user;
$user_date_start = $current_user->getPreference('obm_date_start');
if (!empty($user_date_start) && !isset($_REQUEST['obm_date_start'])) {
$date_start = $user_date_start;
Log::debug("USER PREFERENCES['obm_date_start'] is:");
Log::debug($user_date_start);
} elseif (isset($_REQUEST['obm_year']) && $_REQUEST['obm_year'] != '') {
$date_start = $_REQUEST['obm_year'] . '-01-01';
$current_user->setPreference('obm_date_start', $date_start);
Log::debug("_REQUEST['obm_date_start'] is:");
Log::debug($_REQUEST['obm_date_start']);
Log::debug("_SESSION['obm_date_start'] is:");
Log::debug($current_user->getPreference('obm_date_start'));
} else {
$date_start = date('Y') . '-01-01';
}
$user_date_end = $current_user->getPreference('obm_date_end');
if (!empty($user_date_end) && !isset($_REQUEST['obm_date_end'])) {
$date_end = $user_date_end;
Log::debug("USER PREFERENCES['obm_date_end'] is:");
Log::debug($date_end);
} elseif (isset($_REQUEST['obm_year']) && $_REQUEST['obm_year'] != '') {
$date_end = $_REQUEST['obm_year'] . '-12-31';
$current_user->setPreference('obm_date_end', $date_end);
Log::debug("_REQUEST['obm_date_end'] is:");
Log::debug($_REQUEST['obm_date_end']);
Log::debug("USER PREFERENCES['obm_date_end'] is:");
Log::debug($current_user->getPreference('obm_date_end'));
} else {
$date_end = date('Y') . '-12-31';
}
$ids = array();
//get list of user ids for which to display data
$user_ids = $current_user->getPreference('obm_ids');
if (!empty($user_ids) && count($user_ids) != 0 && !isset($_REQUEST['obm_ids'])) {
$ids = $user_ids;
Log::debug("USER PREFERENCES['obm_ids'] is:");
Log::debug($user_ids);
} elseif (isset($_REQUEST['obm_ids']) && count($_REQUEST['obm_ids']) > 0) {
$ids = $_REQUEST['obm_ids'];
$current_user->setPreference('obm_ids', $_REQUEST['obm_ids']);
Log::debug("_REQUEST['obm_ids'] is:");
Log::debug($_REQUEST['obm_ids']);
Log::debug("USER PREFRENCES['obm_ids'] is:");
Log::debug($current_user->getPreference('obm_ids'));
} else {
$ids = get_user_array(false);
$ids = array_keys($ids);
}
//create unique prefix based on selected users for image files
$id_hash = '1';
if (isset($ids)) {
sort($ids);
$id_hash = crc32(implode('', $ids));
if ($id_hash < 0) {
$id_hash = $id_hash * -1;
}
}
Log::debug("ids is:");
Log::debug($ids);
$id_md5 = substr(md5($current_user->id), 0, 9);
// cn: format date_start|end to user's preferred
global $timedate;
$dateDisplayStart = strftime($timedate->get_user_date_format(), strtotime($date_start));
$dateDisplayEnd = strftime($timedate->get_user_date_format(), strtotime($date_end));
$seps = array("-", "/");
$dates = array($date_start, $date_end);
$dateFileNameSafe = str_replace($seps, "_", $dates);
$cache_file_name = sugar_cached("xml/") . $current_user->getUserPrivGuid() . "_outcome_by_month_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
Log::debug("cache file name is: {$cache_file_name}");
global $app_strings;
$tools = '<div align="right"><a href="index.php?module=' . $currentModule . '&action=' . $action . '&obm_refresh=true" class="tabFormAdvLink">' . SugarThemeRegistry::current()->getImage('refresh', 'border="0" align="absmiddle"', null, null, '.gif', $mod_strings['LBL_REFRESH']) . ' ' . $current_module_strings['LBL_REFRESH'] . '</a> <a href="javascript: toggleDisplay(\'outcome_by_month_edit\');" class="tabFormAdvLink">' . SugarThemeRegistry::current()->getImage('edit', 'border="0" align="absmiddle"', null, null, '.gif', $mod_strings['LBL_EDIT']) . ' ' . $current_module_strings['LBL_EDIT'] . '</a> ' . $extra_tools . '</div>';
?>
<?php
echo '<span onmouseover="this.style.cursor=\'move\'" id="chart_handle_' . $this->order . '">' . get_form_header($current_module_strings['LBL_YEAR_BY_OUTCOME'], $tools, false) . '</span>';
?>
<?php
$cal_lang = "en";
$cal_dateformat = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
if (empty($_SESSION['obm_ids'])) {
$_SESSION['obm_ids'] = "";
}
?>
<p>
<div id='outcome_by_month_edit' style='display: none;'>
<form name="outcome_by_month" action="index.php" method="post" >
<input type="hidden" name="module" value="<?php
//.........这里部分代码省略.........
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:101,代码来源:Chart_outcome_by_month.php
示例12: process_page
/**
*
*/
function process_page()
{
global $theme;
global $mod_strings;
global $app_strings;
global $app_list_strings;
global $currentModule;
global $sugar_version, $sugar_config;
$output_html = '';
$where = '';
$where = $this->_get_where_clause();
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
$status = empty($_REQUEST['status']) ? '' : $_REQUEST['status'];
$campaign_type = empty($_REQUEST['campaign_type']) ? '' : $_REQUEST['campaign_type'];
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
//START:FOR MULTI-SELECT
$multi_select = false;
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
$multi_select = true;
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Prospects',document.MassUpdate,'mass[]','" . $app_strings['ERR_NOTHING_SELECTED'] . "');\" title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' value=' " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . " ' />\n";
}
//END:FOR MULTI-SELECT
if (!$hide_clear_button) {
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CLEAR_BUTTON_KEY'] . "' value=' " . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . " ' />\n";
}
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CANCEL_BUTTON_KEY'] . "' value=' " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . " ' />\n";
$button .= "</form>\n";
$form = new XTemplate('modules/Campaigns/Popup_picker.html');
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', $theme);
$form->assign('MODULE_NAME', $currentModule);
$form->assign('request_data', $request_data);
$form->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['campaign_type_dom'], ""));
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
// Reset the sections that are already in the page so that they do not print again later.
$form->reset('main.SearchHeader');
// create the listview
$seed_bean = new Campaign();
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->multi_select_popup = $multi_select;
//FOR MULTI-SELECT
$ListView->xTemplate->assign("TAG_TYPE", "A");
//FOR MULTI-SELECT
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
//FOR MULTI-SELECT
$ListView->setHeaderText($button);
//FOR MULTI-SELECT
$ListView->setQuery($where, '', 'name', 'CAMPAIGN');
$ListView->setModStrings($mod_strings);
ob_start();
//$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false); //FOR MULTI-SELECT
$ListView->processListView($seed_bean, 'main', 'CAMPAIGN');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= insert_popup_footer();
return $output_html;
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:72,代码来源:Popup_picker.php
示例13: display
function display($title = '', $section = 'main', $return = FALSE)
{
if ($this->type == 1) {
ob_start();
$this->lv->setHeaderTitle($title);
$this->lv->processListView($this->focus, $section, $this->prefix);
$output = ob_get_contents();
ob_end_clean();
} else {
$output = get_form_header($title, '', false) . $this->lv->display();
}
if ($return) {
return $output;
} else {
echo $output;
}
}
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:17,代码来源:ListViewFacade.php
示例14: draw
function draw($extra_tools)
{
require_once 'include/utils.php';
global $app_list_strings, $current_language, $ids, $sugar_config, $theme;
$current_module_strings = return_module_language($current_language, 'Charts');
if (isset($_REQUEST['pbls_refresh'])) {
$refresh = $_REQUEST['pbls_refresh'];
} else {
$refresh = false;
}
$tempx = array();
$datax = array();
$selected_datax = array();
//get list of sales stage keys to display
global $current_user;
$user_tempx = $current_user->getPreference('pbls_lead_sources');
if (!empty($user_tempx) && count($user_tempx) > 0 && !isset($_REQUEST['pbls_lead_sources'])) {
$tempx = $user_tempx;
$GLOBALS['log']->debug("USER PREFERENCES['pbls_lead_sources'] is:");
$GLOBALS['log']->debug($user_tempx);
} elseif (isset($_REQUEST['pbls_lead_sources']) && count($_REQUEST['pbls_lead_sources']) > 0) {
$tempx = $_REQUEST['pbls_lead_sources'];
$current_user->setPreference('pbls_lead_sources', $_REQUEST['pbls_lead_sources']);
$GLOBALS['log']->debug("_REQUEST['pbls_lead_sources'] is:");
$GLOBALS['log']->debug($_REQUEST['pbls_lead_sources']);
$GLOBALS['log']->debug("USER PREFERENCES['pbls_lead_sources'] is:");
$GLOBALS['log']->debug($current_user->getPreference('pbls_lead_sources'));
}
//set $datax using selected sales stage keys
if (count($tempx) > 0) {
foreach ($tempx as $key) {
$datax[$key] = $app_list_strings['lead_source_dom'][$key];
array_push($selected_datax, $key);
}
} else {
$datax = $app_list_strings['lead_source_dom'];
$selected_datax = array_keys($app_list_strings['lead_source_dom']);
}
$GLOBALS['log']->debug("datax is:");
$GLOBALS['log']->debug($datax);
$ids = array();
$user_ids = $current_user->getPreference('pbls_ids');
//get list of user ids for which to display data
if (!empty($user_ids) && count($user_ids) != 0 && !isset($_REQUEST['pbls_ids'])) {
if (isset($_SESSION['pbls_ids'])) {
$ids = $_SESSION['pbls_ids'];
}
$GLOBALS['log']->debug("USER PREFERENCES['pbls_ids'] is:");
$GLOBALS['log']->debug($user_ids);
} elseif (isset($_REQUEST['pbls_ids']) && count($_REQUEST['pbls_ids']) > 0) {
$ids = $_REQUEST['pbls_ids'];
$current_user->setPreference('pbls_ids', $ids);
$GLOBALS['log']->debug("_REQUEST['pbls_ids'] is:");
$GLOBALS['log']->debug($_REQUEST['pbls_ids']);
$GLOBALS['log']->debug("USER PREFERENCES['pbls_ids'] is:");
$GLOBALS['log']->debug($current_user->getPreference('pbls_ids'));
} else {
$ids = get_user_array(false);
$ids = array_keys($ids);
}
//create unique prefix based on selected users for image files
$id_hash = '1';
if (isset($ids) && is_array($ids)) {
sort($ids);
$id_hash = crc32(implode('', $ids));
if ($id_hash < 0) {
$id_hash = $id_hash * -1;
}
}
$GLOBALS['log']->debug("ids is:");
$GLOBALS['log']->debug($ids);
$id_md5 = substr(md5($current_user->id), 0, 9);
$seps = array("-", "/");
$dates = array(date('Y-m-d'), date('Y-m-d'));
$dateFileNameSafe = str_replace($seps, "_", $dates);
$cache_file_name = $current_user->getUserPrivGuid() . "_pipeline_by_lead_source_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
$GLOBALS['log']->debug("cache file name is: {$cache_file_name}");
global $currentModule, $action, $image_path;
$tools = '<div align="right"><a href="index.php?module=' . $currentModule . '&action=' . $action . '&pbls_refresh=true" class="chartToolsLink">' . get_image($image_path . 'refresh', 'alt="Refresh" border="0" align="absmiddle"') . ' ' . $current_module_strings['LBL_REFRESH'] . '</a> <a href="javascript: toggleDisplay(\'pbls_edit\');" class="chartToolsLink">' . get_image($image_path . 'edit', 'alt="Edit" border="0" align="absmiddle"') . ' ' . $current_module_strings['LBL_EDIT'] . '</a> ' . $extra_tools . '</div>';
?>
<?php
echo '<span onmouseover="this.style.cursor=\'move\'" id="chart_handle_' . $this->order . '">' . get_form_header($current_module_strings['LBL_LEAD_SOURCE_FORM_TITLE'], $tools, false) . '</span>';
if (empty($_SESSION['pbls_lead_sources'])) {
$_SESSION['pbls_lead_sources'] = "";
}
if (empty($_SESSION['pbls_ids'])) {
$_SESSION['pbls_ids'] = "";
}
?>
<p>
<div id='pbls_edit' style='display: none;'>
<form action="index.php" method="post" >
<input type="hidden" name="module" value="<?php
echo $currentModule;
?>
">
<input type="hidden" name="action" value="<?php
echo $action;
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:101,代码来源:Chart_pipeline_by_lead_source.php
示例15: display
function display($showContainer = true, $forceTabless = false)
{
global $layout_edit_mode, $sugar_version, $sugar_config, $current_user, $app_strings;
if (isset($layout_edit_mode) && $layout_edit_mode) {
return;
}
global $modListHeader;
ob_start();
echo '<script type="text/javascript" src="' . getJSPath('include/SubPanel/SubPanelTiles.js') . '"></script>';
?>
<script>
if(document.DetailView != null &&
document.DetailView.elements != null &&
document.DetailView.elements.layout_def_key != null &&
typeof document.DetailView.elements['layout_def_key'] != 'undefined'){
document.DetailView.elements['layout_def_key'].value = '<?php
echo $this->layout_def_key;
?>
';
}
</script>
<?php
$tabs = array();
$default_div_display = 'inline';
if (!empty($sugar_config['hide_subpanels_on_login'])) {
if (!isset($_SESSION['visited_details'][$this->focus->module_dir])) {
setcookie($this->focus->module_dir . '_divs', '');
unset($_COOKIE[$this->focus->module_dir . '_divs']);
$_SESSION['visited_details'][$this->focus->module_dir] = true;
}
$default_div_display = 'none';
}
$div_cookies = get_sub_cookies($this->focus->module_dir . '_divs');
//Display the group header. this section is executed only if the tabbed interface is being used.
$current_key = '';
if (!empty($this->show_tabs)) {
require_once 'include/tabs.php';
$tab_panel = new SugarWidgetTabs($tabs, $current_key, 'showSubPanel');
echo get_form_header('Related', '', false);
echo "<br />" . $tab_panel->display();
}
if (empty($_REQUEST['subpanels'])) {
$selected_group = $forceTabless ? '' : $this->getSelectedGroup();
$usersLayout = $current_user->getPreference('subpanelLayout', $this->focus->module_dir);
// we need to use some intelligence here when restoring the user's layout, as new modules with new subpanels might have been installed since the user's layout was recorded
// this means that we can't just restore the old layout verbatim as the new subpanels would then go walkabout
// so we need to do a merge while attempting as best we can to preserve the sense of the specified order
// this is complicated by the different ordering schemes used in the two sources for the panels: the user's layout uses an ordinal layout, the panels from getTabs have an explicit ordering driven by the 'order' parameter
// it's not clear how to best reconcile these two schemes; so we punt on it, and add all new panels to the end of the user's layout. At least this will give them a clue that something has changed...
// we also now check for tabs that have been removed since the user saved his or her preferences.
$tabs = $this->getTabs($showContainer, $selected_group);
if (!empty($usersLayout)) {
$availableTabs = $tabs;
$tabs = array_intersect($usersLayout, $availableTabs);
// remove any tabs that have been removed since the user's layout was saved
foreach (array_diff($availableTabs, $usersLayout) as $tab) {
$tabs[] = $tab;
}
}
} else {
$tabs = explode(',', $_REQUEST['subpanels']);
}
$tab_names = array();
if ($showContainer) {
echo '<ul class="noBullet" id="subpanel_list">';
}
//echo "<li id='hidden_0' style='height: 5px' class='noBullet'> </li>";
if (empty($GLOBALS['relationships'])) {
if (!class_exists('Relationship')) {
require 'modules/Relationships/Relationship.php';
}
$rel = new Relationship();
$rel->load_relationship_meta();
}
// this array will store names of sub-panels that can contain items
// of each module
$module_sub_panels = array();
foreach ($tabs as $tab) {
//load meta definition of the sub-panel.
$thisPanel = $this->subpanel_definitions->load_subpanel($tab);
if ($thisPanel === false) {
continue;
}
//this if-block will try to skip over ophaned subpanels. Studio/MB are being delete unloaded modules completely.
//this check will ignore subpanels that are collections (activities, history, etc)
if (!isset($thisPanel->_instance_properties['collection_list']) and isset($thisPanel->_instance_properties['get_subpanel_data'])) {
//ignore when data source is a function
if (!isset($this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']])) {
if (stripos($thisPanel->_instance_properties['get_subpanel_data'], 'function:') === false) {
Log::fatal("Bad subpanel definition, it has incorrect value for get_subpanel_data property " . $tab);
continue;
}
} else {
$rel_name = '';
if (isset($this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']]['rela
|
请发表评论