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


PHP insert_popup_footer函数代码示例

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


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

示例1: testinsert_popup_footer

 public function testinsert_popup_footer()
 {
     //execute the method and test if it returns html
     ob_start();
     insert_popup_footer();
     $renderedContent = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent));
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:9,代码来源:layoutUtilsTest.php

示例2: process_page

 function process_page()
 {
     global $theme;
     global $mod_strings;
     global $app_strings;
     global $currentModule;
     global $current_language;
     global $current_module_strings;
     if (!is_file(sugar_cached('jsLanguage/WorkFlow/') . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('WorkFlow', $GLOBALS['current_language']);
     }
     $javascript_language_files = getVersionedScript("cache/jsLanguage/WorkFlow/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
     $current_module_strings = return_module_language($current_language, 'WorkFlowAlertShells');
     $ListView = new ListView();
     $header_text = '';
     if (isset($_REQUEST['workflow_id'])) {
         $workflow = BeanFactory::getBean('WorkFlow', $_REQUEST['workflow_id']);
         //TODO GET ALL ALERTS HERE
         //$focus_alerts_list = $workflow->get_linked_beans('wf_alerts','WorkFlowAlertShell');
         $alerts = BeanFactory::getBean('WorkFlowAlertShells');
         $current_module_strings = return_module_language($current_language, $alerts->module_dir);
         insert_popup_header($theme);
         $ListView->initNewXTemplate('modules/WorkFlowAlertShells/Popup_picker.html', $current_module_strings);
         $ListView->xTemplateAssign("WORKFLOW_ID", $workflow->id);
         $ListView->xTemplateAssign("JAVASCRIPT_LANGUAGE_FILES", $javascript_language_files);
         $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$workflow->id}");
         $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
         $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
         $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text);
         //$ListView->setHeaderText($button);
         //$ListView->setQuery("workflow_alertshells.alert_type = 'Email'","","", "ALERT");
         $list = $alerts->get_list("", "workflow_alertshells.alert_type = 'Email'");
         $display_list = $this->cullFromList($list['list'], $workflow->base_module, $workflow->type);
         $ListView->processListViewTwo($display_list, "main", "ALERT");
         insert_popup_footer();
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:38,代码来源:Popup_picker.php

示例3: array

$subpanel = $_REQUEST['subpanel'];
$record = $_REQUEST['record'];
$module = $_REQUEST['module'];
$collection = array();
if (isset($_REQUEST['collection_basic']) && $_REQUEST['collection_basic'][0] != 'null') {
    $_REQUEST['collection_basic'] = explode(',', $_REQUEST['collection_basic'][0]);
    $collection = $_REQUEST['collection_basic'];
}
if (empty($_REQUEST['inline'])) {
    insert_popup_header($theme);
}
//require_once('include/SubPanel/SubPanelDefinitions.php');
//require_once($beanFiles[$beanList[$_REQUEST['module']]]);
//$focus=new $beanList[$_REQUEST['module']];
//$focus->retrieve($record);
include 'custom/include/SubPanel/SubPanel.php';
$layout_def_key = '';
if (!empty($_REQUEST['layout_def_key'])) {
    $layout_def_key = $_REQUEST['layout_def_key'];
}
$subpanel_object = new CustomSubPanel($module, $record, $subpanel, null, $layout_def_key, $collection);
$subpanel_object->setTemplateFile('custom/include/SubPanel/SubPanelDynamic.html');
echo empty($_REQUEST['inline']) ? $subpanel_object->get_buttons() : '';
$subpanel_object->display();
$jsAlerts = new jsAlerts();
if (!isset($_SESSION['isMobile'])) {
    echo $jsAlerts->getScript();
}
if (empty($_REQUEST['inline'])) {
    insert_popup_footer($theme);
}
开发者ID:omusico,项目名称:SelkirkCRM,代码行数:31,代码来源:SubPanelViewer.php

示例4: process_page

 /**
  *
  */
 function process_page()
 {
     global $mod_strings;
     global $app_strings;
     global $currentModule;
     global $sugar_version, $sugar_config;
     $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 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'] . "' 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/ACLRoles/Popup_picker.html');
     $form->assign('MOD', $mod_strings);
     $form->assign('APP', $app_strings);
     $form->assign('MODULE_NAME', $currentModule);
     $form->assign('NAME', $name);
     $form->assign('request_data', $request_data);
     ob_start();
     insert_popup_header();
     $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 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 .= insert_popup_footer();
     return $output_html;
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:53,代码来源:Popup_picker.php

示例5: process_page

 /**
  *
  */
 function process_page()
 {
     global $theme;
     global $mod_strings;
     global $app_strings;
     global $currentModule;
     global $sugar_version, $sugar_config;
     global $app_list_strings;
     global $sugar_config;
     $b_from_documents = false;
     if (isset($_REQUEST['caller']) && $_REQUEST['caller'] == 'Documents') {
         $b_from_documents = true;
     }
     //initalize template
     $form = new XTemplate('modules/Documents/Popup_picker.html');
     $form->assign('MOD', $mod_strings);
     $form->assign('APP', $app_strings);
     $form->assign('THEME', $theme);
     $form->assign('MODULE_NAME', $currentModule);
     //tree header.
     $doctree = new Tree('doctree');
     $doctree->set_param('module', 'Documents');
     if ($b_from_documents) {
         $doctree->set_param('caller', 'Documents');
         $href_string = "javascript:populate_parent_search('doctree')";
     } else {
         $href_string = "javascript:populate_search('doctree')";
     }
     $nodes = get_category_nodes($href_string);
     foreach ($nodes as $node) {
         $doctree->add_node($node);
     }
     $form->assign("TREEHEADER", $doctree->generate_header());
     $form->assign("TREEINSTANCE", $doctree->generate_nodes_array());
     $site_data = "<script> var site_url= {\"site_url\":\"" . getJavascriptSiteURL() . "\"};</script>\n";
     $form->assign("SITEURL", $site_data);
     $form->parse('main.SearchHeader.TreeView');
     $treehtml = $form->text('main.SearchHeader.TreeView');
     $form->reset('main.SearchHeader.TreeView');
     //end tree
     if (isset($_REQUEST['caller']) && $_REQUEST['caller'] == 'Documents') {
         ///process treeview and return.
         return insert_popup_header($theme) . $treehtml . insert_popup_footer();
     }
     ////////////////////////process full search form and list view.//////////////////////////////
     $output_html = '';
     $where = '';
     $where = $this->_get_where_clause();
     $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
     $document_name = empty($_REQUEST['document_name']) ? '' : $_REQUEST['document_name'];
     $category_id = empty($_REQUEST['category_id']) ? '' : $_REQUEST['category_id'];
     $subcategory_id = empty($_REQUEST['subcategory_id']) ? '' : $_REQUEST['subcategory_id'];
     $template_type = empty($_REQUEST['template_type']) ? '' : $_REQUEST['template_type'];
     $is_template = empty($_REQUEST['is_template']) ? '' : $_REQUEST['is_template'];
     $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'] . "'  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->assign('NAME', $name);
     $form->assign('DOCUMENT_NAME', $document_name);
     $form->assign('request_data', $request_data);
     $form->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_category_dom'], $category_id));
     $form->assign("SUB_CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_subcategory_dom'], $subcategory_id));
     $form->assign("IS_TEMPLATE_OPTIONS", get_select_options_with_id($app_list_strings['checkbox_dom'], $is_template));
     $form->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], $template_type));
     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');
     //add tree view to output_html.
     $output_html .= $treehtml;
     // create the listview
     $seed_bean = new Document();
     $ListView = new ListView();
     $ListView->show_select_menu = false;
     $ListView->show_delete_button = false;
     $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, '', 'document_name', 'DOCUMENT');
     $ListView->setModStrings($mod_strings);
     ob_start();
     $ListView->processListView($seed_bean, 'main', 'DOCUMENT');
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= insert_popup_footer();
//.........这里部分代码省略.........
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:101,代码来源:Popup_picker.php

示例6: process_page


//.........这里部分代码省略.........
         }
         $history_list[] = array('name' => $email->name, 'id' => $email->id, 'type' => "Email", 'direction' => '', 'module' => "Emails", 'status' => '', 'parent_id' => $email->parent_id, 'parent_type' => $email->parent_type, 'parent_name' => $email->parent_name, 'contact_id' => $email->contact_id, 'contact_name' => $email->contact_name, 'date_modified' => $email->date_start . " " . $email->time_start, 'description' => $this->getEmailDetails($email), 'date_type' => $app_strings['DATA_TYPE_SENT'], 'sort_value' => strtotime($email->fetched_row['date_sent'] . ' GMT'));
     }
     //end Emails
     // Bug 46439 'No email archived when clicking on View Summary' (All condition)
     if (method_exists($focus, 'get_unlinked_email_query')) {
         $queryArray = $focus->get_unlinked_email_query(array('return_as_array' => 'true'));
         $query = $queryArray['select'];
         $query .= $queryArray['from'];
         if (!empty($queryArray['join_tables'])) {
             foreach ($queryArray['join_tables'] as $join_table) {
                 if ($join_table != '') {
                     $query .= ', ' . $join_table . ' ';
                 }
             }
         }
         $query .= $queryArray['join'];
         $query .= $queryArray['where'];
         $emails = new Email();
         $focus_unlinked_emails_list = $emails->process_list_query($query, 0);
         $focus_unlinked_emails_list = $focus_unlinked_emails_list['list'];
         foreach ($focus_unlinked_emails_list as $email) {
             $email->retrieve($email->id);
             $history_list[] = array('name' => $email->name, 'id' => $email->id, 'type' => "Email", 'direction' => '', 'module' => "Emails", 'status' => '', 'parent_id' => $email->parent_id, 'parent_type' => $email->parent_type, 'parent_name' => $email->parent_name, 'contact_id' => $email->contact_id, 'contact_name' => $email->contact_name, 'date_modified' => $email->date_start . " " . $email->time_start, 'description' => $this->getEmailDetails($email), 'date_type' => $app_strings['DATA_TYPE_SENT'], 'sort_value' => strtotime($email->fetched_row['date_sent'] . ' GMT'));
         }
     }
     //end Unlinked Emails
     foreach ($focus_notes_list as $note) {
         $history_list[] = array('name' => $note->name, 'id' => $note->id, 'type' => "Note", 'direction' => '', 'module' => "Notes", 'status' => '', 'parent_id' => $note->parent_id, 'parent_type' => $note->parent_type, 'parent_name' => $note->parent_name, 'contact_id' => $note->contact_id, 'contact_name' => $note->contact_name, 'date_modified' => $note->date_modified, 'description' => $this->formatDescription($note->description), 'date_type' => $app_strings['DATA_TYPE_MODIFIED'], 'sort_value' => strtotime($note->fetched_row['date_modified'] . ' GMT'));
         if (!empty($note->filename)) {
             $count = count($history_list);
             $count--;
             $history_list[$count]['filename'] = $note->filename;
             $history_list[$count]['fileurl'] = UploadFile::get_url($note->filename, $note->id);
         }
     }
     // end Notes
     $xtpl = new XTemplate('modules/Activities/Popup_picker.html');
     $xtpl->assign('MOD', $mod_strings);
     $xtpl->assign('APP', $app_strings);
     insert_popup_header();
     //output header
     echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
     echo getClassicModuleTitle($focus->module_dir, array(translate('LBL_MODULE_NAME', $focus->module_dir), $focus->name), false);
     echo "</td><td align='right' class='moduleTitle'>";
     echo "<A href='javascript:print();' class='utilsLink'><img src='" . SugarThemeRegistry::current()->getImageURL("print.gif") . "' width='13' height='13' alt='" . $app_strings['LNK_PRINT'] . "' border='0' align='absmiddle'></a>&nbsp;<A href='javascript:print();' class='utilsLink'>" . $app_strings['LNK_PRINT'] . "</A>\n";
     echo "</td></tr></table>";
     $oddRow = true;
     if (count($history_list) > 0) {
         $history_list = array_csort($history_list, 'sort_value', SORT_DESC);
     }
     foreach ($history_list as $activity) {
         $activity_fields = array('ID' => $activity['id'], 'NAME' => $activity['name'], 'MODULE' => $activity['module'], 'CONTACT_NAME' => $activity['contact_name'], 'CONTACT_ID' => $activity['contact_id'], 'PARENT_TYPE' => $activity['parent_type'], 'PARENT_NAME' => $activity['parent_name'], 'PARENT_ID' => $activity['parent_id'], 'DATE' => $activity['date_modified'], 'DESCRIPTION' => $activity['description'], 'DATE_TYPE' => $activity['date_type']);
         if (empty($activity['direction'])) {
             $activity_fields['TYPE'] = $app_list_strings['activity_dom'][$activity['type']];
         } else {
             $activity_fields['TYPE'] = $app_list_strings['call_direction_dom'][$activity['direction']] . ' ' . $app_list_strings['activity_dom'][$activity['type']];
         }
         switch ($activity['type']) {
             case 'Call':
                 $activity_fields['STATUS'] = $app_list_strings['call_status_dom'][$activity['status']];
                 break;
             case 'Meeting':
                 $activity_fields['STATUS'] = $app_list_strings['meeting_status_dom'][$activity['status']];
                 break;
             case 'Task':
                 $activity_fields['STATUS'] = $app_list_strings['task_status_dom'][$activity['status']];
                 break;
         }
         if (isset($activity['location'])) {
             $activity_fields['LOCATION'] = $activity['location'];
         }
         if (isset($activity['filename'])) {
             $activity_fields['ATTACHMENT'] = "<a href='index.php?entryPoint=download&id=" . $activity['id'] . "&type=Notes' target='_blank'>" . SugarThemeRegistry::current()->getImage("attachment", "alt='" . $activity['filename'] . "' border='0' align='absmiddle'") . "</a>";
         }
         if (isset($activity['parent_type'])) {
             $activity_fields['PARENT_MODULE'] = $activity['parent_type'];
         }
         $xtpl->assign("ACTIVITY", $activity_fields);
         $xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'] . '', 'border="0" alt="' . $activity_fields['NAME'] . '"'));
         if ($oddRow) {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'oddListRow');
             $xtpl->assign("BG_COLOR", $odd_bg);
         } else {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'evenListRow');
             $xtpl->assign("BG_COLOR", $even_bg);
         }
         $oddRow = !$oddRow;
         if (!empty($activity_fields['DESCRIPTION'])) {
             $xtpl->parse("history.row.description");
         }
         $xtpl->parse("history.row");
         // Put the rows in.
     }
     $xtpl->parse("history");
     $xtpl->out("history");
     insert_popup_footer();
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:101,代码来源:Popup_picker.php

示例7: process_page

 /**
  *
  */
 function process_page()
 {
     global $theme;
     global $focus;
     global $mod_strings;
     global $app_strings;
     global $app_list_strings;
     global $currentModule;
     global $odd_bg;
     global $even_bg;
     global $image_path;
     global $audit;
     global $current_language;
     global $sugar_version;
     $theme_path = "themes/" . $theme . "/";
     $image_path = 'themes/' . $theme . '/images/';
     if (floatval(substr($sugar_version, 0, 3)) < 6.0) {
         require_once $theme_path . 'layout_utils.php';
     } else {
         require_once 'include/utils/layout_utils.php';
     }
     $audit_list = Audit::get_audit_list();
     $xtpl = new XTemplate('modules/Audit/Popup_picker.html');
     $xtpl->assign('THEME', $theme);
     $xtpl->assign('MOD', return_module_language($current_language, 'Audit'));
     $xtpl->assign('APP', $app_strings);
     insert_popup_header($theme);
     //output header
     echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
     $focus_mod_strings = return_module_language($current_language, $focus->module_dir);
     echo get_module_title($focus->module_dir, translate('LBL_MODULE_NAME', $focus->module_dir) . ": " . $focus->name, false);
     echo "</td><td align='right' class='moduleTitle'>";
     echo "<A href='javascript:print();' class='utilsLink'><img src='" . $image_path . "print.gif' width='13' height='13' alt='" . $app_strings['LNK_PRINT'] . "' border='0' align='absmiddle'></a>&nbsp;<A href='javascript:print();' class='utilsLink'>" . $app_strings['LNK_PRINT'] . "</A>\n";
     echo "</td></tr></table>";
     $oddRow = true;
     $audited_fields = $focus->getAuditEnabledFieldDefinitions();
     asort($audited_fields);
     $fields = '';
     $field_count = count($audited_fields);
     $start_tag = "<table><tr><td class=\"listViewPaginationLinkS1\">";
     $end_tag = "</td></tr></table>";
     if ($field_count > 0) {
         $index = 0;
         foreach ($audited_fields as $key => $value) {
             $index++;
             $vname = '';
             if (isset($value['vname'])) {
                 $vname = $value['vname'];
             } else {
                 if (isset($value['label'])) {
                     $vname = $value['label'];
                 }
             }
             $fields .= str_replace(':', '', translate($vname, $focus->module_dir));
             if ($index < $field_count) {
                 $fields .= ", ";
             }
         }
         echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $fields . $end_tag;
     } else {
         echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $end_tag;
     }
     foreach ($audit_list as $audit) {
         if (isset($audit['before_value_string']) || isset($audit['after_value_string'])) {
             $before_value = $audit['before_value_string'];
             $after_value = $audit['after_value_string'];
         } else {
             // show textblocks correctly formatted.
             // TODO: be careful of security implications
             $before_value = from_html($audit['before_value_text']);
             $after_value = from_html($audit['after_value_text']);
         }
         $activity_fields = array('ID' => $audit['id'], 'NAME' => $audit['field_name'], 'BEFORE_VALUE' => $before_value, 'AFTER_VALUE' => $after_value, 'CREATED_BY' => $audit['created_by'], 'DATE_CREATED' => $audit['date_created']);
         $xtpl->assign("ACTIVITY", $activity_fields);
         if ($oddRow) {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'oddListRow');
             $xtpl->assign("BG_COLOR", $odd_bg);
         } else {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'evenListRow');
             $xtpl->assign("BG_COLOR", $even_bg);
         }
         $oddRow = !$oddRow;
         $xtpl->parse("audit.row");
         // Put the rows in.
     }
     //end foreach
     $xtpl->parse("audit");
     $xtpl->out("audit");
     insert_popup_footer();
 }
开发者ID:santara12,项目名称:OpenQuotesAndContracts,代码行数:95,代码来源:Popup_picker.php

示例8: get_select_options_with_id

$form->assign('DOCUMENT_REVISION_ID', $document_revision_id);
//$form->assign('request_data', $request_data);
$form->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_category_dom'], $category_id));
$form->assign("SUB_CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_subcategory_dom'], $subcategory_id));
$form->assign("IS_TEMPLATE_OPTIONS", get_select_options_with_id($app_list_strings['checkbox_dom'], $is_template));
$form->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], $template_type));
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($current_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('Documents');
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($current_mod_strings['LBL_LIST_FORM_TITLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'document_name', 'DOCUMENT');
$ListView->setModStrings($current_mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'DOCUMENT');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= insert_popup_footer();
echo $output_html;
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:PopupDocuments.php

示例9: process_page


//.........这里部分代码省略.........
             $date_due = $task->date_due;
         }
         if ($task->status != "Not Started" && $task->status != "In Progress" && $task->status != "Pending Input") {
             $history_list[] = array('name' => $task->name, 'id' => $task->id, 'type' => "Task", 'direction' => '', 'module' => "Tasks", 'status' => $task->status, 'parent_id' => $task->parent_id, 'parent_type' => $task->parent_type, 'parent_name' => $task->parent_name, 'contact_id' => $task->contact_id, 'contact_name' => $task->contact_name, 'date_modified' => $date_due, 'description' => $this->getTaskDetails($task), 'date_type' => 'Due:');
         } else {
             $open_activity_list[] = array('name' => $task->name, 'id' => $task->id, 'type' => "Task", 'direction' => '', 'module' => "Tasks", 'status' => $task->status, 'parent_id' => $task->parent_id, 'parent_type' => $task->parent_type, 'parent_name' => $task->parent_name, 'contact_id' => $task->contact_id, 'contact_name' => $task->contact_name, 'date_due' => $date_due, 'description' => $this->getTaskDetails($task), 'date_type' => 'Due:');
         }
     }
     // end Tasks
     foreach ($focus_meetings_list as $meeting) {
         if ($meeting->status != "Planned") {
             $history_list[] = array('name' => $meeting->name, 'id' => $meeting->id, 'type' => "Meeting", 'direction' => '', 'module' => "Meetings", 'status' => $meeting->status, 'parent_id' => $meeting->parent_id, 'parent_type' => $meeting->parent_type, 'parent_name' => $meeting->parent_name, 'contact_id' => $meeting->contact_id, 'contact_name' => $meeting->contact_name, 'date_modified' => $meeting->date_start, 'description' => $this->formatDescription($meeting->description), 'date_type' => 'Start:');
         } else {
             $open_activity_list[] = array('name' => $meeting->name, 'id' => $meeting->id, 'type' => "Meeting", 'direction' => '', 'module' => "Meetings", 'status' => $meeting->status, 'parent_id' => $meeting->parent_id, 'parent_type' => $meeting->parent_type, 'parent_name' => $meeting->parent_name, 'contact_id' => $meeting->contact_id, 'contact_name' => $meeting->contact_name, 'date_due' => $meeting->date_start, 'description' => $this->formatDescription($meeting->description), 'date_type' => 'Start:');
         }
     }
     // end Meetings
     foreach ($focus_calls_list as $call) {
         if ($call->status != "Planned") {
             $history_list[] = array('name' => $call->name, 'id' => $call->id, 'type' => "Call", 'direction' => $call->direction, 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_modified' => $call->date_start, 'description' => $this->formatDescription($call->description), 'date_type' => 'Start:');
         } else {
             $open_activity_list[] = array('name' => $call->name, 'id' => $call->id, 'direction' => $call->direction, 'type' => "Call", 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_due' => $call->date_start, 'description' => $this->formatDescription($call->description), 'date_type' => 'Start:');
         }
     }
     // end Calls
     foreach ($focus_emails_list as $email) {
         $history_list[] = array('name' => $email->name, 'id' => $email->id, 'type' => "Email", 'direction' => '', 'module' => "Emails", 'status' => '', 'parent_id' => $email->parent_id, 'parent_type' => $email->parent_type, 'parent_name' => $email->parent_name, 'contact_id' => $email->contact_id, 'contact_name' => $email->contact_name, 'date_modified' => $email->date_start . " " . $email->time_start, 'description' => $this->getEmailDetails($email), 'date_type' => 'Sent:');
     }
     //end Emails
     foreach ($focus_notes_list as $note) {
         $history_list[] = array('name' => $note->name, 'id' => $note->id, 'type' => "Note", 'direction' => '', 'module' => "Notes", 'status' => '', 'parent_id' => $note->parent_id, 'parent_type' => $note->parent_type, 'parent_name' => $note->parent_name, 'contact_id' => $note->contact_id, 'contact_name' => $note->contact_name, 'date_modified' => $note->date_modified, 'description' => $this->formatDescription($note->description), 'date_type' => 'Modified:');
         if (!empty($note->filename)) {
             $count = count($history_list);
             $count--;
             $history_list[$count]['filename'] = $note->filename;
             $history_list[$count]['fileurl'] = UploadFile::get_url($note->filename, $note->id);
         }
     }
     // end Notes
     $xtpl = new XTemplate('modules/Activities/Popup_picker.html');
     $xtpl->assign('THEME', $theme);
     $xtpl->assign('MOD', $mod_strings);
     $xtpl->assign('APP', $app_strings);
     insert_popup_header($theme);
     //output header
     echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
     echo get_module_title($focus->module_dir, $focus->module_dir . ": " . $focus->name, false);
     echo "</td><td align='right' class='moduleTitle'>";
     echo "<A href='javascript:print();' class='utilsLink'><img src='" . $image_path . "print.gif' width='13' height='13' alt='" . $app_strings['LNK_PRINT'] . "' border='0' align='absmiddle'></a>&nbsp;<A href='javascript:print();' class='utilsLink'>" . $app_strings['LNK_PRINT'] . "</A>\n";
     echo "</td></tr></table>";
     $oddRow = true;
     if (count($history_list) > 0) {
         $history_list = array_csort($history_list, 'date_modified', SORT_DESC);
     }
     foreach ($history_list as $activity) {
         $activity_fields = array('ID' => $activity['id'], 'NAME' => $activity['name'], 'MODULE' => $activity['module'], 'CONTACT_NAME' => $activity['contact_name'], 'CONTACT_ID' => $activity['contact_id'], 'PARENT_TYPE' => $activity['parent_type'], 'PARENT_NAME' => $activity['parent_name'], 'PARENT_ID' => $activity['parent_id'], 'DATE' => $activity['date_modified'], 'DESCRIPTION' => $activity['description'], 'DATE_TYPE' => $activity['date_type']);
         if (empty($activity['direction'])) {
             $activity_fields['TYPE'] = $app_list_strings['activity_dom'][$activity['type']];
         } else {
             $activity_fields['TYPE'] = $app_list_strings['call_direction_dom'][$activity['direction']] . ' ' . $app_list_strings['activity_dom'][$activity['type']];
         }
         switch ($activity['type']) {
             case 'Call':
                 $activity_fields['STATUS'] = $app_list_strings['call_status_dom'][$activity['status']];
                 break;
             case 'Meeting':
                 $activity_fields['STATUS'] = $app_list_strings['meeting_status_dom'][$activity['status']];
                 break;
             case 'Task':
                 $activity_fields['STATUS'] = $app_list_strings['task_status_dom'][$activity['status']];
                 break;
         }
         if (isset($activity['location'])) {
             $activity_fields['LOCATION'] = $activity['location'];
         }
         if (isset($activity['filename'])) {
             $activity_fields['ATTACHMENT'] = "<a href='" . $activity['fileurl'] . "' target='_blank'>" . get_image($image_path . "attachment", "alt='" . $activity['filename'] . "' border='0' align='absmiddle'") . "</a>";
         }
         if (isset($activity['parent_type'])) {
             $activity_fields['PARENT_MODULE'] = $activity['parent_type'];
         }
         $xtpl->assign("ACTIVITY", $activity_fields);
         $xtpl->assign("ACTIVITY_MODULE_PNG", get_image($image_path . $activity_fields['MODULE'] . '', 'border="0" alt="' . $activity_fields['NAME'] . '"'));
         if ($oddRow) {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'oddListRow');
             $xtpl->assign("BG_COLOR", $odd_bg);
         } else {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'evenListRow');
             $xtpl->assign("BG_COLOR", $even_bg);
         }
         $oddRow = !$oddRow;
         $xtpl->parse("history.row");
         // Put the rows in.
     }
     $xtpl->parse("history");
     $xtpl->out("history");
     insert_popup_footer();
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:101,代码来源:Popup_picker.php

示例10: 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

示例11: process_page_for_merge

 function process_page_for_merge()
 {
     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'];
     $account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
     $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('Contacts',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/Contacts/MailMergePicker.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('ACCOUNT_NAME', $account_name);
     $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
     $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 = new Contact();
     $ListView = new ListView();
     $ListView->display_header_and_footer = false;
     $ListView->show_export_button = false;
     $ListView->process_for_popups = true;
     $ListView->setXTemplate($form);
     $ListView->multi_select_popup = $multi_select;
     if ($multi_select) {
         $ListView->xTemplate->assign("TAG_TYPE", "SPAN");
     } else {
         $ListView->xTemplate->assign("TAG_TYPE", "A");
     }
     $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
     $ListView->setQuery($where, '', 'contacts.last_name, contacts.first_name', 'CONTACT');
     $ListView->setModStrings($mod_strings);
     ob_start();
     $output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
     //BEGIN ATHENA CUSTOMIZATION - rsmith
     $query = $_REQUEST['select'] . ' WHERE ' . $_REQUEST['where'] . "'" . $_REQUEST['id'] . "'";
     //$response = $seed_bean->process_list_query($_REQUEST['select'], 0, -1, -1, $_REQUEST['where']."'".$_REQUEST['id']."'");
     $result = $seed_bean->db->query($query, true, "Error retrieving {$seed_bean->object_name} list: ");
     $list = array();
     while (($row = $seed_bean->db->fetchByAssoc($result)) != null) {
         $seed_bean = new Contact();
         foreach ($seed_bean->field_defs as $field => $value) {
             if (isset($row[$field])) {
                 $seed_bean->{$field} = $row[$field];
             } else {
                 if (isset($row[$seed_bean->table_name . '.' . $field])) {
                     $seed_bean->{$field} = $row[$seed_bean->table_name . '.' . $field];
                 } else {
                     $seed_bean->{$field} = "";
                 }
             }
         }
         $seed_bean->fill_in_additional_list_fields();
         $list[] = $seed_bean;
     }
     $ListView->processListViewTwo($list, 'main', 'CONTACT');
     //END ATHENA CUSTOMIZATION - rsmith
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= insert_popup_footer();
     return $output_html;
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:92,代码来源:Popup_picker.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: process_page


//.........这里部分代码省略.........
        $form->assign('APP', $app_strings);
        $form->assign('THEME', $theme);
        $form->assign('MODULE_NAME', $currentModule);
        $form->assign('request_data', $request_data);
        // CREATE STUFF
        if ($this->_create) {
            $form->assign('CREATEBUTTON', $createButton);
            $form->assign('ADDFORMHEADER', $addformheader);
            $form->assign('ADDFORM', $addform);
        }
        // CREATE STUFF
        if (isset($this->_popupMeta['className'])) {
            $seed_bean = new $this->_popupMeta['className']();
        } else {
            $seed_bean = new $this->_popupMeta['moduleMain']();
        }
        // assign search inputs to xtemplates
        foreach (array_keys($searchInputs) as $key) {
            if (!empty($_REQUEST[$key]) && (isset($seed_bean->field_name_map[$key]['type']) && $seed_bean->field_name_map[$key]['type'] == 'bool')) {
                $form->assign(strtoupper($key), ' checked ');
            } else {
                $form->assign(strtoupper($key), $searchInputs[$key]);
            }
        }
        if ($this->_create) {
            $form->assign('CREATE', 'true');
        } else {
            $form->assign('CREATE', 'false');
        }
        // fill any doms
        if (isset($this->_popupMeta['selectDoms'])) {
            foreach ($this->_popupMeta['selectDoms'] as $key => $value) {
                $form->assign($key, get_select_options_with_id($app_list_strings[$value['dom']], $value['searchInput']));
            }
        }
        $form->assign('MULTI_SELECT', !empty($_REQUEST['mode']) ? strtoupper($_REQUEST['mode']) : '');
        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');
        $ListView = new ListView();
        $ListView->show_select_menu = false;
        $ListView->show_delete_button = false;
        $ListView->show_export_button = false;
        $ListView->process_for_popups = true;
        $ListView->setXTemplate($form);
        $ListView->multi_select_popup = $multi_select;
        $ListView->xTemplate->assign('TAG_TYPE', 'A');
        if (isset($this->_popupMeta['listTitle'])) {
            $ListView->setHeaderTitle($this->_popupMeta['listTitle']);
        } else {
            $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
        }
        $ListView->setHeaderText($button);
        $ListView->setQuery($where, '', $this->_popupMeta['orderBy'], $this->_popupMeta['varName']);
        $ListView->setModStrings($mod_strings);
        ob_start();
        $ListView->processListView($seed_bean, 'main', $this->_popupMeta['varName']);
        $output_html .= ob_get_contents();
        ob_end_clean();
        $json = getJSONobj();
        // decode then encode to escape "'s
        $output_html .= "</form>\n\t\t<script type=\"text/javascript\">\n\t\tfunction save_checks(offset) {\n\t\t\tchecked_ids = Array();\n\t\t\tfor (i = 0; i < document.MassUpdate.elements.length; i++){\n\t\t\t\tif(document.MassUpdate.elements[i].name == 'mass[]' && document.MassUpdate.elements[i].checked) {\n\t\t\t\t\ttemp_string = '';\n\t\t\t\t\ttemp_string += '\"' + document.MassUpdate.elements[i].value + '\": {';\n\t\t\t\t\tfor(the_key in associated_javascript_data[document.MassUpdate.elements[i].value]) {\n\t\t\t\t\t\ttemp_string += '\"' + the_key + '\":\"' + associated_javascript_data[document.MassUpdate.elements[i].value][the_key] + '\",'; \n\t\t\t\t\t}\n\t\t\t\t\ttemp_string = temp_string.substring(0,temp_string.length - 1);\n\t\t\t\t\ttemp_string += '}';\n\t\t\t\t\tchecked_ids.push(temp_string);\n\t\t\t\t}\t\t\t\t \n\t\t\t}\n\t\t\tdocument.MassUpdate.saved_associated_data.value = escape('{' + checked_ids.join(',') + '}');\n\n\t\t\tdocument.MassUpdate.action.value = \"Popup\";\n\t\t\tdocument.MassUpdate.{$currentModule}" . '_' . strtoupper($this->_popupMeta['moduleMain']) . '_offset.value = offset;
			document.MassUpdate.submit();
		}
		// reassigned the saved data from the saved checks
		if(typeof(document.MassUpdate) != \'undefined\' && document.MassUpdate.saved_associated_data.value != \'\') {
			temp_array = ' . (!empty($_REQUEST['saved_associated_data']) ? $json->encode($json->decode(urldecode($_REQUEST['saved_associated_data']))) : '\'\'') . ';
			for(the_key in temp_array) {
				associated_javascript_data[the_key] = temp_array[the_key];
			}
		}

		// save checks across pages for multiselects 
		if(typeof(document.MassUpdate) != "undefined") {		
			checked_items = Array();
			inputs_array = document.MassUpdate.elements;
	
			for(wp = 0 ; wp < inputs_array.length; wp++) {
				if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
					checked_items.push(inputs_array[wp].value);
				} 
			}
			for(i in checked_items) {
				for(wp = 0 ; wp < inputs_array.length; wp++) {
					if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
						inputs_array[wp].checked = true;
					}
				}
			}
		}
		</script>';
        $output_html .= insert_popup_footer();
        return $output_html;
    }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:101,代码来源:Popup_picker.php

示例14: insert_popup_footer

        $filter1_expression_text = $display_array['lhs_field'] . " " . $display_array['operator'] . " " . $display_array['rhs_value'];
    } else {
        $filter1_expression_text = $mod_strings['LBL_SPECIFIC_FIELD_LNK'];
    }
    //end if base_id is there
} else {
    $filter1_expression_text = $mod_strings['LBL_SPECIFIC_FIELD_LNK'];
}
$form->assign("TRIGGER_EXP_ID", $filter1_object->id);
$form->assign("TRIGGER_RHS_VALUE", $filter1_object->rhs_value);
$form->assign("TRIGGER_TEXT", $filter1_expression_text);
$form->assign("TRIGGER_OPERATOR", $filter1_object->operator);
$form->assign("TRIGGER_EXP_TYPE", $filter1_object->exp_type);
$form->assign("TRIGGER_LHS_MODULE", $target_module);
$form->assign("TRIGGER_LHS_FIELD", $filter1_object->lhs_field);
/////////////////END Filter1 Object/////////////////////////////////
/////////////////End Items 	//////////////////////
//close window and refresh parent if needed
if (!empty($_REQUEST['special_action']) && $_REQUEST['special_action'] == "refresh") {
    $special_javascript = "window.opener.document.DetailView.action.value = 'DetailView'; \n";
    $special_javascript .= "window.opener.document.DetailView.submit(); \n";
    $special_javascript .= "window.close();";
    $form->assign("SPECIAL_JAVASCRIPT", $special_javascript);
}
$form->parse("main");
$form->out("main");
?>

<?php 
insert_popup_footer();
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:30,代码来源:CreateStepFilter.php

示例15: process_page_for_address


//.........这里部分代码省略.........
        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');
        $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 Contact();
        $ListView = new ListView();
        $ListView->show_export_button = false;
        $ListView->setXTemplate($form);
        $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
        $ListView->setHeaderText($button);
        $ListView->setQuery($where, '', '', 'CONTACT');
        $ListView->setModStrings($mod_strings);
        // Added
        $ListView->process_for_popups = true;
        ob_start();
        $ListView->processListViewMulti($seed_bean, 'main', 'CONTACT');
        $output_html .= ob_get_contents();
        ob_end_clean();
        // The following is a regular expression filter that will convert the nested <a>...</a> tags
        // for the Next and Previous button links.  The regular expression has 7 placeholder fields
        // Given sample HTML as follows
        /* -------------------------------------
                <a href="/maint_4_5_0/index.php?module=Contacts&action=Popup&query=true&account_name=360 Vacations 723351&html=change_address&primary_address_street=111 Silicon Valley Road&primary_address_city=Ohio&primary_address_state=CA&primary_address_postalcode=53430&primary_address_country=USA&mode=undefined&create=undefined&metadata=undefined&Contacts_CONTACT_offset=20" onclick="javascript:return sListView.save_checks(20, \'Contacts_CONTACT_offset\')" class="listViewPaginationLinkS1">Next&nbsp;
                <img src=\'themes/GoldenGate/images/next.gif\' width=\'8\' height=\'11\' alt=\'Next\'  border=\'0\' align=\'absmiddle\'></a>
                &nbsp;&nbsp;
                <a href="/maint_4_5_0/index.php?module=Contacts&action=Popup&query=true&account_name=360 Vacations 723351&html=change_address&primary_address_street=111 Silicon Valley Road&primary_address_city=Ohio&primary_address_state=CA&primary_address_postalcode=53430&primary_address_country=USA&mode=undefined&create=undefined&metadata=undefined&Contacts_CONTACT_offset=-100" onclick="javascript:return sListView.save_checks(980, \'Contacts_CONTACT_offset\')" class="listViewPaginationLinkS1">End&nbsp;
                <img src=\'themes/GoldenGate/images/end.gif\' width=\'13\' height=\'11\' alt=\'End\'  border=\'0\' align=\'absmiddle\'>
                </a>
                --------------------------------------
                The resulting preg_replace call should create Array of matches:
        	    [1] => Array
        	        (
        	            [0] => 20
        	        )
        	
        	    [2] => Array
        	        (
        	            [0] => Next&nbsp;
        	        )
        	
        	    [3] => Array
        	        (
        	            [0] => <img src='themes/GoldenGate/images/next.gif' width='8' height='11' alt='Next'  border='0' align='absmiddle'>
        	        )
        	
        	    [4] => Array
        	        (
        	            [0] => &nbsp;&nbsp;
        	        )
        	
        	    [5] => Array
        	        (
        	            [0] => 980
        	        )
        	
        	    [6] => Array
        	        (
        	            [0] => End&nbsp;
        	        )
        	
        	    [7] => Array
        	        (
        	            [0] => <img src='themes/GoldenGate/images/end.gif' width='13' height='11' alt='End'  border='0' align='absmiddle'>
        	        )
        	    */
        $exp = '/<a.*?checks\\((\\d+),.*?>(.*?)(<img.*>).*<\\/a>(.*?)<a.*?checks\\((\\d+),.*?>(.*?)(<img.*>).*<\\/a>/Ui';
        $change = '<a class="listViewPaginationLinkS1" onclick="javascript:save_checks(${1}, \'Contacts_CONTACT_offset\');" href="#">
        ${2}${3}</a>${4}<a class="listViewPaginationLinkS1" onclick="javascript:save_checks(${5}, \'Contacts_CONTACT_offset\');" href="#">${6}${7}</a>';
        $output_html = preg_replace(array($exp), array($change), $output_html);
        $output_html .= '<script>		
		checked_items = Array();
		inputs_array = document.MassUpdate.elements;

		for(wp = 0 ; wp < inputs_array.length; wp++) {
			if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
				checked_items.push(inputs_array[wp].value);
			} 
		}
		for(i in checked_items) {
			for(wp = 0 ; wp < inputs_array.length; wp++) {
				if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
					inputs_array[wp].checked = true;
				}
			}
		}



        </script>';
        $output_html .= get_form_footer();
        $output_html .= insert_popup_footer();
        return $output_html;
    }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:101,代码来源:Popup_picker.php


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