當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMA_isInsertRow函數代碼示例

本文整理匯總了PHP中PMA_isInsertRow函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_isInsertRow函數的具體用法?PHP PMA_isInsertRow怎麽用?PHP PMA_isInsertRow使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了PMA_isInsertRow函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: PMA_isInsertRow

PMA_Util::checkParameters(array('db', 'table', 'goto'));
$GLOBALS['dbi']->selectDb($GLOBALS['db']);
/**
 * Initializes some variables
 */
$goto_include = false;
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('makegrid.js');
// Needed for generation of Inline Edit anchors
$scripts->addFile('sql.js');
$scripts->addFile('indexes.js');
$scripts->addFile('gis_data_editor.js');
// check whether insert row mode, if so include tbl_change.php
PMA_isInsertRow();
$after_insert_actions = array('new_insert', 'same_insert', 'edit_next');
if (isset($_REQUEST['after_insert']) && in_array($_REQUEST['after_insert'], $after_insert_actions)) {
    $url_params['after_insert'] = $_REQUEST['after_insert'];
    if (isset($_REQUEST['where_clause'])) {
        foreach ($_REQUEST['where_clause'] as $one_where_clause) {
            if ($_REQUEST['after_insert'] == 'same_insert') {
                $url_params['where_clause'][] = $one_where_clause;
            } elseif ($_REQUEST['after_insert'] == 'edit_next') {
                PMA_setSessionForEditNext($one_where_clause);
            }
        }
    }
}
//get $goto_include for different cases
$goto_include = PMA_getGotoInclude($goto_include);
開發者ID:altesien,項目名稱:FinalProject,代碼行數:31,代碼來源:tbl_replace.php

示例2: testIsInsertRow

 /**
  * Test for PMA_isInsertRow
  *
  * @return void
  */
 public function testIsInsertRow()
 {
     $_REQUEST['insert_rows'] = 5;
     $GLOBALS['cfg']['InsertRows'] = 2;
     $scriptsMock = $this->getMockBuilder('PMA_Scripts')->disableOriginalConstructor()->setMethods(array('addFile'))->getMock();
     $scriptsMock->expects($this->once())->method('addFile');
     $headerMock = $this->getMockBuilder('PMA_Header')->disableOriginalConstructor()->setMethods(array('getScripts'))->getMock();
     $headerMock->expects($this->once())->method('getScripts')->will($this->returnValue($scriptsMock));
     $responseMock = $this->getMockBuilder('PMA_Response')->disableOriginalConstructor()->setMethods(array('getHeader'))->getMock();
     $responseMock->expects($this->once())->method('getHeader')->will($this->returnValue($headerMock));
     $response = new ReflectionProperty('PMA_Response', '_instance');
     $response->setAccessible(true);
     $response->setValue(null, $responseMock);
     PMA_isInsertRow();
     $this->assertEquals(5, $GLOBALS['cfg']['InsertRows']);
 }
開發者ID:kfjihailong,項目名稱:phpMyAdmin,代碼行數:21,代碼來源:PMA_insert_edit_test.php


注:本文中的PMA_isInsertRow函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。