• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP insert_popup_header函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了insert_popup_header函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: testinsert_popup_header

 public function testinsert_popup_header()
 {
     //execute the method and test if it returns html/JS
     //with includeJS true, generates more html
     ob_start();
     insert_popup_header();
     $renderedContent1 = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent1));
     //with includeJS false, generates less html
     ob_start();
     insert_popup_header('', false);
     $renderedContent2 = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent2));
     $this->assertGreaterThan(strlen($renderedContent2), strlen($renderedContent1));
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:17,代码来源:layoutUtilsTest.php


示例3: 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 $audit;
        global $current_language;
        $audit_list = Audit::get_audit_list();
        $xtpl = new XTemplate('modules/Audit/Popup_picker.html');
        $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>";
        $mod_strings = return_module_language($current_language, $focus->module_dir);
        $printImageURL = SugarThemeRegistry::current()->getImageURL('print.gif');
        $titleExtra = <<<EOHTML
<a href="javascript:void window.open('index.php?{$GLOBALS['request_string']}','printwin','menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,location=1')" class='utilsLink'>
<!--not_in_theme!--><img src="{$printImageURL}" alt="{$GLOBALS['app_strings']['LNK_PRINT']}"></a>
<a href="javascript:void window.open('index.php?{$GLOBALS['request_string']}','printwin','menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,location=1')" class='utilsLink'>
{$GLOBALS['app_strings']['LNK_PRINT']}
</a>
EOHTML;
        $params = array();
        $params[] = translate('LBL_MODULE_NAME', $focus->module_dir);
        $params[] = $focus->get_summary_text();
        $params[] = translate('LBL_CHANGE_LOG', 'Audit');
        echo str_replace('</div>', "<span class='utils'>{$titleExtra}</span></div>", getClassicModuleTitle($focus->module_dir, $params, false));
        $oddRow = true;
        $audited_fields = $focus->getAuditEnabledFieldDefinitions();
        asort($audited_fields);
        $fields = '';
        $field_count = count($audited_fields);
        $start_tag = "<table><tr><td >";
        $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 (empty($audit['before_value_string']) && empty($audit['after_value_string'])) {
                $before_value = $audit['before_value_text'];
                $after_value = $audit['after_value_text'];
            } else {
                $before_value = $audit['before_value_string'];
                $after_value = $audit['after_value_string'];
            }
            // Let's run the audit data through the sugar field system
            if (isset($audit['data_type'])) {
                require_once 'include/SugarFields/SugarFieldHandler.php';
                $vardef = array('name' => 'audit_field', 'type' => $audit['data_type']);
                $field = SugarFieldHandler::getSugarField($audit['data_type']);
                $before_value = $field->getChangeLogSmarty(array($vardef['name'] => $before_value), $vardef, array(), $vardef['name']);
                $after_value = $field->getChangeLogSmarty(array($vardef['name'] => $after_value), $vardef, array(), $vardef['name']);
            }
            $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:delkyd,项目名称:sugarcrm_dev,代码行数:100,代码来源:Popup_picker.php


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


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


示例6: process_page_for_address

    /**
     *
     */
    function process_page_for_address()
    {
        global $theme;
        global $mod_strings;
        global $app_strings;
        global $currentModule;
        global $sugar_version, $sugar_config;
        $output_html = '';
        $where = '';
        $where = $this->_get_where_clause();
        $image_path = 'themes/' . $theme . '/images/';
        $formBase = new ContactFormBase();
        if (isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save') {
            $formBase->handleSave('', false, true);
        }
        $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'];
        $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
        $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
        $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
        $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
        $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
        // TODO: cleanup the construction of $addform
        $formbody = $formBase->getFormBody('', '', 'EmailEditView');
        $addform = '<table><tr><td nowrap="nowrap" valign="top">' . str_replace('<br>', '</td><td nowrap="nowrap" valign="top">&nbsp;', $formbody) . '</td></tr></table>' . '<input type="hidden" name="action" value="Popup" />';
        $formSave = <<<EOQ
\t\t<input type="submit" name="button" class="button" title="{$lbl_save_button_title}" accesskey="{$lbl_save_button_key}" value="  {$lbl_save_button_label}  " />
\t\t<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
EOQ;
        $createContact = <<<EOQ
\t\t<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACT']}" onclick="toggleDisplay('addform');" />
EOQ;
        $addformheader = get_form_header($mod_strings['LNK_NEW_CONTACT'], $formSave, false);
        $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/Contacts/Address_picker.html');
        $form->assign('MOD', $mod_strings);
        $form->assign('APP', $app_strings);
        //$form->assign('CREATECONTACT', $createContact);
        $form->assign('ADDFORMHEADER', $addformheader);
        $form->assign('ADDFORM', $addform);
        $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);
        $form->assign('request_data', $request_data);
        // fill in for mass update
        $button = "<input type='hidden' name='module' value='Contacts'><input type='hidden' id='form_action' name='action' value='index'><input type='hidden' name='massupdate' value='true'><input type='hidden' name='delete' value='false'><input type='hidden' name='mass' value='Array'><input type='hidden' name='Update' value='Update'>";
        if (isset($_REQUEST['mass']) && is_array($_REQUEST['mass'])) {
            foreach (array_unique($_REQUEST['mass']) as $record) {
                $button .= "<input style='display: none' checked type='checkbox' name='mass[]' value='{$record}'>\n";
            }
        }
        $button .= "<input type='hidden' name='saved_associated_data' value=''>";
        $button .= "<input type='hidden' name='query' value='true'>";
        $button .= "<input type='hidden' name='close_window' value='true'>";
        $button .= "<input type='hidden' name='html' value='change_address'>";
        $button .= "<input type='hidden' name='account_name' value='{$account_name}'>";
        $button .= "<span style='display: none'><textarea name='primary_address_street'>" . str_replace("&lt;br&gt;", "\n", $_REQUEST["primary_address_street"]) . "</textarea></span>";
        $button .= "<input type='hidden' name='primary_address_city' value='" . $_REQUEST["primary_address_city"] . "'>";
        $button .= "<input type='hidden' name='primary_address_state' value='" . $_REQUEST["primary_address_state"] . "'>";
        $button .= "<input type='hidden' name='primary_address_postalcode' value='" . $_REQUEST["primary_address_postalcode"] . "'>";
        $button .= "<input type='hidden' name='primary_address_country' value='" . $_REQUEST["primary_address_country"] . "'>";
        $button .= "<input type='hidden' name='Contacts_CONTACT_offset' value=''>";
        $button .= "<input title='" . $mod_strings['LBL_COPY_ADDRESS_CHECKED'] . "'  class='button' LANGUAGE=javascript type='submit' name='button' value='  " . $mod_strings['LBL_COPY_ADDRESS_CHECKED'] . "  '>\n";
        $button .= "<input title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' accessKey='" . $app_strings['LBL_CANCEL_BUTTON_KEY'] . "' class='button' LANGUAGE=javascript onclick=\"window.close()\" type='submit' name='button' value='  " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . "  '>\n";
        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();
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:101,代码来源:Popup_picker.php


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


示例8: display


//.........这里部分代码省略.........
     } else {
         if (empty($searchdefs) && file_exists('custom/modules/' . $this->module . '/metadata/searchdefs.php')) {
             require_once 'custom/modules/' . $this->module . '/metadata/searchdefs.php';
         } else {
             if (empty($searchdefs) && file_exists('modules/' . $this->module . '/metadata/searchdefs.php')) {
                 require_once 'modules/' . $this->module . '/metadata/searchdefs.php';
             }
         }
     }
     //if you click the pagination button, it will populate the search criteria here
     if (!empty($this->bean) && isset($_REQUEST[$this->module . '2_' . strtoupper($this->bean->object_name) . '_offset'])) {
         if (!empty($_REQUEST['current_query_by_page'])) {
             $blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'sortOrder', 'orderBy', 'request_data', 'current_query_by_page');
             $current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
             foreach ($current_query_by_page as $search_key => $search_value) {
                 if ($search_key != $this->module . '2_' . strtoupper($this->bean->object_name) . '_offset' && !in_array($search_key, $blockVariables)) {
                     if (!is_array($search_value)) {
                         $_REQUEST[$search_key] = securexss($search_value);
                     } else {
                         foreach ($search_value as $key => &$val) {
                             $val = securexss($val);
                         }
                         $_REQUEST[$search_key] = $search_value;
                     }
                 }
             }
         }
     }
     if (!empty($listViewDefs) && !empty($searchdefs)) {
         require_once 'include/Popups/PopupSmarty.php';
         $displayColumns = array();
         $filter_fields = array();
         $popup = new PopupSmarty($this->bean, $this->module);
         foreach ($listViewDefs[$this->module] as $col => $params) {
             $filter_fields[strtolower($col)] = true;
             if (!empty($params['related_fields'])) {
                 foreach ($params['related_fields'] as $field) {
                     //id column is added by query construction function. This addition creates duplicates
                     //and causes issues in oracle. #10165
                     if ($field != 'id') {
                         $filter_fields[$field] = true;
                     }
                 }
             }
             if (!empty($params['default']) && $params['default']) {
                 $displayColumns[$col] = $params;
             }
         }
         $popup->displayColumns = $displayColumns;
         $popup->filter_fields = $filter_fields;
         $popup->mergeDisplayColumns = true;
         //check to see if popupdefs contains searchdefs
         $popup->_popupMeta = $popupMeta;
         $popup->listviewdefs = $listViewDefs;
         $popup->searchdefs = $searchdefs;
         if (isset($_REQUEST['query'])) {
             $popup->searchForm->populateFromRequest();
         }
         $massUpdateData = '';
         if (isset($_REQUEST['mass'])) {
             foreach (array_unique($_REQUEST['mass']) as $record) {
                 $massUpdateData .= "<input style='display: none' checked type='checkbox' name='mass[]' value='{$record}'>\n";
             }
         }
         $popup->massUpdateData = $massUpdateData;
         $tpl = 'include/Popups/tpls/PopupGeneric.tpl';
         if (file_exists($this->getCustomFilePathIfExists("modules/{$this->module}/tpls/popupGeneric.tpl"))) {
             $tpl = $this->getCustomFilePathIfExists("modules/{$this->module}/tpls/popupGeneric.tpl");
         }
         if (file_exists($this->getCustomFilePathIfExists("modules/{$this->module}/tpls/popupHeader.tpl"))) {
             $popup->headerTpl = $this->getCustomFilePathIfExists("modules/{$this->module}/tpls/popupHeader.tpl");
         }
         if (file_exists($this->getCustomFilePathIfExists("modules/{$this->module}/tpls/popupFooter.tpl"))) {
             $popup->footerTpl = $this->getCustomFilePathIfExists("modules/{$this->module}/tpls/popupFooter.tpl");
         }
         $popup->setup($tpl);
         //We should at this point show the header and javascript even if to_pdf is true.
         //The insert_popup_header javascript is incomplete and shouldn't be relied on.
         if (isset($this->options['show_all']) && $this->options['show_all'] == false) {
             unset($this->options['show_all']);
             $this->options['show_javascript'] = true;
             $this->options['show_header'] = true;
             $this->_displayJavascript();
         }
         insert_popup_header(null, false);
         if (isset($this->override_popup['template_data']) && is_array($this->override_popup['template_data'])) {
             $popup->th->ss->assign($this->override_popup['template_data']);
         }
         echo $popup->display();
     } else {
         if (file_exists('modules/' . $this->module . '/Popup_picker.php')) {
             require_once 'modules/' . $this->module . '/Popup_picker.php';
         } else {
             require_once 'include/Popups/Popup_picker.php';
         }
         $popup = new Popup_Picker();
         $popup->_hide_clear_button = true;
         echo $popup->process_page();
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:101,代码来源:view.popup.php


示例9: 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 $audit;
     global $current_language;
     $audit_list = Audit::get_audit_list();
     $xtpl = new XTemplate('modules/Audit/Popup_picker.html');
     $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>";
     $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='" . 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;
     $audited_fields = $focus->getAuditEnabledFieldDefinitions();
     asort($audited_fields);
     $fields = '';
     $field_count = count($audited_fields);
     $start_tag = "<table><tr><td >";
     $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 (empty($audit['before_value_string']) && empty($audit['after_value_string'])) {
             $before_value = $audit['before_value_text'];
             $after_value = $audit['after_value_text'];
         } else {
             $before_value = $audit['before_value_string'];
             $after_value = $audit['after_value_string'];
         }
         $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:klr2003,项目名称:sourceread,代码行数:83,代码来源:Popup_picker.php


示例10: 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;
     $theme_path = "themes/" . $theme . "/";
     $image_path = 'themes/' . $theme . '/images/';
     require_once $theme_path . 'layout_utils.php';
     $history_list = array();
     if (!empty($_REQUEST['record'])) {
         $result = $focus->retrieve($_REQUEST['record']);
         if ($result == null) {
             sugar_die($app_strings['ERROR_NO_RECORD']);
         }
     }
     if ($focus->object_name == "ProjectTask" || $focus->object_name == "Project") {
         $focus_tasks_list = array();
     } else {
         $focus_tasks_list = $focus->get_linked_beans('tasks', 'Task');
     }
     $focus_meetings_list = $focus->get_linked_beans('meetings', 'Meeting');
     $focus_calls_list = $focus->get_linked_beans('calls', 'Call');
     $focus_emails_list = $focus->get_linked_beans('emails', 'Email');
     $focus_notes_list = $focus->get_linked_beans('notes', 'Note');
     foreach ($focus_tasks_list as $task) {
         if ($task->date_due == '0000-00-00') {
             $date_due = '';
         } else {
             $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_n 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP insert_query函数代码示例发布时间:2022-05-15
下一篇:
PHP insert_popup_footer函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap