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


PHP Browse::getExecuteSql方法代码示例

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


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

示例1: act_browse

 public function act_browse()
 {
     global $conf;
     include_once APPROOT . 'inc/lib_form.inc';
     require_once APPROOT . 'mod/analysis/analysisModule.class.php';
     $analysisModule = new analysisModule();
     $sqlStatement = $analysisModule->generateSqlforEntity('supporting_docs_meta', null, $_GET, 'browse');
     $entity_type_form_results = generate_formarray('supporting_docs_meta', 'browse');
     $entity_type_form_results['doc_id']['type'] = 'text';
     if (isset($entity_type_form_results['format'])) {
         $entity_type_form_results['format']['type'] = 'text';
     }
     $field_list = array();
     foreach ($entity_type_form_results as $field_name => $field) {
         // Generates the view's Label list
         $field_list[$field['map']['field']] = $field['label'];
     }
     if (is_array($conf['browsefields']['supporting_docs_meta']) && in_array("eventslinks", $conf['browsefields']['supporting_docs_meta'])) {
         $field_list['eventslinks'] = _t('LINKS');
     }
     foreach ($entity_type_form_results as $fieldName => &$field) {
         $field['extra_opts']['help'] = null;
         $field['label'] = null;
         $field['extra_opts']['clari'] = null;
         $field['extra_opts']['value'] = $_GET[$fieldName];
         $field['extra_opts']['required'] = null;
         $field['extra_opts']['class'] = "input-block-level";
     }
     $entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
     $htmlFields = array();
     //iterate through the search fields, checking input values
     foreach ($entity_type_form_results as $field_name => $x) {
         // Generates the view's Label list
         $htmlFields[$field_name] = $entity_fields_html[$field_name];
     }
     $this->result_pager = Browse::getExecuteSql($sqlStatement);
     $this->result_pager->setArgumentEncoder($this->argumentEncoder);
     $this->columnValues = $this->result_pager->get_page_data();
     $this->columnValues = set_links_in_recordset($this->columnValues, 'supporting_docs_meta');
     set_huriterms_in_record_array($entity_type_form_results, $this->columnValues);
     foreach ($this->columnValues as $k => $v) {
         $linksa = array();
         $links = Browse::getDocumentLinks($v['doc_id'], 'event');
         foreach ($links as $record) {
             $linksa[] = "<a href=\"" . get_record_url($record['record_number'], "event") . "\" >" . $record['record_number'] . "</a>";
         }
         $this->columnValues[$k]['eventslinks'] = implode("<br/>", $linksa);
     }
     //rendering the view
     $this->columnNames = $field_list;
     $this->htmlFields = $htmlFields;
     //var_dump($this->columnNames , $this->columnValues , $htmlFields	);
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:53,代码来源:docuModule.class.php

示例2: searchResult

 protected function searchResult()
 {
     require_once APPROOT . 'mod/analysis/analysisModule.class.php';
     $analysisModule = new analysisModule();
     $dataArray = array();
     //assign post search queries to get
     foreach ($_REQUEST as $key => $element) {
         if ($_REQUEST[$key] != null) {
             $_GET[$key] = $_REQUEST[$key];
         }
     }
     $sqlStatement = $analysisModule->generateSqlforEntity('person', null, $_REQUEST, 'search');
     $entity_type_form_results = generate_formarray('person', 'search_view');
     $entity_type_form_results['person_record_number']['type'] = 'text';
     $field_list = array();
     foreach ($entity_type_form_results as $field_name => $field) {
         $field_list[$field['map']['field']] = $field['label'];
     }
     foreach ($entity_type_form_results as $fieldName => &$field) {
         $field['extra_opts']['help'] = null;
         $field['label'] = null;
         $field['extra_opts']['clari'] = null;
         $field['extra_opts']['value'] = $_GET[$fieldName];
         $field['extra_opts']['required'] = null;
     }
     $entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
     $htmlFields = array();
     //iterate through the search fields, checking input values
     foreach ($entity_type_form_results as $field_name => $x) {
         // Generates the view's Label list
         $htmlFields[$field_name] = $entity_fields_html[$field_name];
     }
     $result_pager = Browse::getExecuteSql($sqlStatement);
     $columnValues = $result_pager->get_page_data();
     $columnValues = set_links_in_recordset($columnValues, 'person');
     set_huriterms_in_record_array($entity_type_form_results, $columnValues);
     //rendering the view
     $columnNames = $field_list;
     $this->htmlFields = $htmlFields;
     if ($columnValues != null && count($columnValues)) {
         $result_pager->render_pages();
         shn_form_get_html_person_search_ctrl($columnNames, $columnValues, $htmlFields, $_GET['mod'], $_GET['act']);
         $result_pager->render_pages();
     } else {
         shnMessageQueue::addInformation(_t('NO_RECORDS_WERE_FOUND_'));
         echo shnMessageQueue::renderMessages();
     }
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:48,代码来源:relatedPersonSearch.class.php

示例3: act_doc_list

 public function act_doc_list()
 {
     $sqlStatement = Browse::getEventsDocList($this->event_id, $_GET);
     include_once APPROOT . 'inc/lib_form.inc';
     $entity_type_form_results = array('doc_id' => array('type' => 'text', 'label' => 'Document ID', 'map' => array('entity' => 'supporting_docs_meta', 'field' => 'doc_id')), 'entity_type' => array('type' => 'text', 'label' => 'Entity', 'map' => array('entity' => 'supporting_docs_meta', 'field' => 'entity_type')), 'title' => array('type' => 'text', 'label' => 'Document Title', 'map' => array('entity' => 'supporting_docs_meta', 'field' => 'title')), 'type' => array('type' => 'mt_select', 'label' => 'Type', 'map' => array('entity' => 'supporting_docs_meta', 'field' => 'type', 'mt' => 16)), 'format' => array('type' => 'text', 'label' => 'Format', 'map' => array('entity' => 'supporting_docs_meta', 'field' => 'format')));
     $field_list = array();
     foreach ($entity_type_form_results as $field_name => $field) {
         // Generates the view's Label list
         $field_list[$field['map']['field']] = $field['label'];
     }
     foreach ($entity_type_form_results as $fieldName => &$field) {
         $field['extra_opts']['help'] = null;
         $field['label'] = null;
         $field['extra_opts']['clari'] = null;
         $field['extra_opts']['value'] = $_GET[$fieldName];
         $field['extra_opts']['required'] = null;
         $field['extra_opts']['class'] = "input-block-level";
     }
     $entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
     $htmlFields = array();
     //iterate through the search fields, checking input values
     foreach ($entity_type_form_results as $field_name => $x) {
         // Generates the view's Label list
         $htmlFields[$field_name] = $entity_fields_html[$field_name];
     }
     $this->result_pager = Browse::getExecuteSql($sqlStatement);
     $this->columnValues = $this->result_pager->get_page_data();
     $this->columnValues = set_links_in_recordset($this->columnValues, 'supporting_docs_meta');
     $recordArray = array();
     foreach ($this->columnValues as $key => $columnValue) {
         foreach ($columnValue as $val => $value) {
             if ($val == 'entity_type') {
                 $recordArray[$key]['entity_record_url'] = get_record_url($columnValue['record_number'], $columnValue['entity_type']);
                 $recordArray[$key][$val] = ucfirst($columnValue['entity_type']);
             } else {
                 $recordArray[$key][$val] = $value;
             }
         }
     }
     $this->columnValues = $recordArray;
     set_huriterms_in_record_array($entity_type_form_results, $this->columnValues);
     //rendering the view
     $this->columnNames = $field_list;
     $this->htmlFields = $htmlFields;
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:45,代码来源:eventsModule.class.php

示例4: searchResult

 protected function searchResult()
 {
     include_once APPROOT . 'inc/lib_form.inc';
     require_once APPROOT . 'mod/analysis/analysisModule.class.php';
     $analysisModule = new analysisModule();
     $sqlStatement = $analysisModule->generateSqlforEntity('supporting_docs_meta', null, $_POST, 'search');
     $entity_type_form_results = generate_formarray('supporting_docs_meta', 'browse');
     $entity_type_form_results['doc_id']['type'] = 'text';
     $field_list = array();
     foreach ($entity_type_form_results as $field_name => $field) {
         $field_list[$field['map']['field']] = $field['label'];
     }
     foreach ($entity_type_form_results as $fieldName => &$field) {
         $field['extra_opts']['help'] = null;
         $field['label'] = null;
         $field['extra_opts']['clari'] = null;
         $field['extra_opts']['value'] = $_GET[$fieldName];
         $field['extra_opts']['required'] = null;
     }
     $entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
     $htmlFields = array();
     //iterate through the search fields, checking input values
     foreach ($entity_type_form_results as $field_name => $x) {
         // Generates the view's Label list
         $htmlFields[$field_name] = $entity_fields_html[$field_name];
     }
     $result_pager = Browse::getExecuteSql($sqlStatement);
     $columnValues = $result_pager->get_page_data();
     $columnValues = set_links_in_recordset($columnValues, 'supporting_docs_meta');
     set_huriterms_in_record_array($entity_type_form_results, $columnValues);
     //rendering the view
     $columnNames = $field_list;
     $this->htmlFields = $htmlFields;
     if ($columnValues != null && count($columnValues)) {
         $result_pager->render_post_pages();
         shn_form_get_html_doc_search_ctrl($columnNames, $columnValues, $htmlFields);
         $result_pager->render_post_pages();
     } else {
         shnMessageQueue::addInformation(_t('NO_RECORDS_WERE_FOUND_'));
         echo shnMessageQueue::renderMessages();
     }
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:42,代码来源:DocumentSearch.class.php

示例5: act_browse_biography

 public function act_browse_biography()
 {
     include_once APPROOT . 'inc/lib_form.inc';
     //$notIn = acl_list_acts_permissons();
     $notIn = 'allowed_records';
     // passed to generateSql function to use the temporary table to find the allowed records
     require_once APPROOT . 'mod/analysis/analysisModule.class.php';
     $analysisModule = new analysisModule();
     $sqlStatement = $analysisModule->generateSqlforEntity('biographic_details', null, $_GET, 'browse');
     $entity_type_form_results = generate_formarray('biographic_details', 'browse');
     $entity_type_form_results['biographic_details_record_number']['type'] = 'text';
     $field_list = array();
     foreach ($entity_type_form_results as $field_name => $field) {
         // Generates the view's Label list
         $field_list[$field['map']['field']] = $field['label'];
     }
     foreach ($entity_type_form_results as $fieldName => &$field) {
         $field['extra_opts']['help'] = null;
         $field['label'] = null;
         $field['extra_opts']['clari'] = null;
         $field['extra_opts']['value'] = $_GET[$fieldName];
         $field['extra_opts']['required'] = null;
         $field['extra_opts']['class'] = "input-block-level";
     }
     $entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
     $htmlFields = array();
     //iterate through the search fields, checking input values
     foreach ($entity_type_form_results as $field_name => $x) {
         // Generates the view's Label list
         $htmlFields[$field_name] = $entity_fields_html[$field_name];
     }
     //var_dump($sqlStatement);
     $this->result_pager = Browse::getExecuteSql($sqlStatement);
     $this->columnValues = $this->result_pager->get_page_data();
     $additionalurlfields = array();
     $additionalurlfields["person"] = array("entity" => "person", "val" => "person");
     $additionalurlfields["related_person"] = array("entity" => "person", "val" => "person");
     $additionalurlfields["biographic_details_record_number"] = array("entity" => "biographic_details", "val" => "biographic_details_record_number");
     $this->columnValues = set_links_in_recordset($this->columnValues, 'biographic_details', $additionalurlfields);
     // var_dump($this->columnValues);exit;
     set_huriterms_in_record_array($entity_type_form_results, $this->columnValues);
     //rendering the view
     $this->columnNames = $field_list;
     $this->htmlFields = $htmlFields;
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:45,代码来源:personModule.class.php


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