2
{
$this->doXmlString2Xml($string,$xpath);
}
/**
* Adds an additional pear::db_result resultset to $this->xmldoc
*
* @param Object db_result result from a DB-query
* @see doSql2Xml()
* @access public
*/
function addResult($result)
{
$this->doSql2Xml($result);
}
/**
* Adds an aditional resultset generated from an sql-statement
* to $this->xmldoc
*
* @param string sql a string containing an sql-statement.
* @access public
* @see doSql2Xml()
*/
function addSql($sql)
{
/* if there are {} expressions in the sql query, we assume it's an xpath expression to
* be evaluated.
*/
if (preg_match_all ("/\{([^\}]+)\}/i",$sql,$matches))
{
foreach ($matches[1] as $match)
{
$sql = preg_replace("#\{".preg_quote($match)."\}# ", $this->getXpathValue($match),$sql);
}
}
$result = $this->db->query($sql);
//very strange
if (PEAR::isError($result->result)) {
print "You have an SQL-Error:
".$result->result->userinfo;
print "
";
new DB_Error($result->result->code,PEAR_ERROR_DIE);
}
$this->doSql2Xml($result);
}
/**
* Adds an aditional resultset generated from an Array
* to $this->xmldoc
* TODO: more explanation, how arrays are transferred
*
* @param array multidimensional array.
* @access public
* @see doArray2Xml()
*/
function addArray ($array)
{
$parent_row = $this->insertNewResult(&$metadata);
$this->DoArray2Xml($array,$parent_row);
}
/**
* Returns an xml-string with a xml-representation of the resultsets.
*
* The resultset can be directly provided here, or if you need more than one
* in your xml, then you have to provide each of them with add() before you
* call getXML, but the last one can also be provided here.
*
* @param mixed $result result Object from a DB-query
* @return string xml
* @access public
*/
function getXML($result = Null)
{
$xmldoc = $this->getXMLObject($result);
return $xmldoc->dumpmem();
}
/**
* Returns an xml DomDocument Object with a xml-representation of the resultsets.
*
* The resultset can be directly provided here, or if you need more than one
* in your xml, then you have to provide each of them with add() before you
* call getXMLObject, but the last one can also be provided here.
*
* @param mixed $result result Object from a DB-query
* @return Object DomDocument
* @access public
*/
function getXMLObject($result = Null)
{
if ($result) {
$this->add ($result);
}
return $this->xmldoc;
}
/**
* For adding db_result-"trees" to $this->xmldoc
* @param Object db_result
* @access private
* @see addResult(),addSql()
*/
function doSql2Xml($result)
{
if (DB::IsError($result)) {
print "Error in file ".__FILE__." at line ".__LINE__."
\n";
print $result->userinfo."
\n";
new DB_Error($result->code,PEAR_ERROR_DIE);
}
// the method_exists is here, cause tableInfo is only in the cvs at the moment
// BE CAREFUL: if you have fields with the same name in different tables, you will get errors
// later, since DB_FETCHMODE_ASSOC doesn't differentiate that stuff.
$this->LastResult = &$result;
if (!method_exists($result,"tableInfo") || ! ($tableInfo = $result->tableInfo(False)))
{
//emulate tableInfo. this can go away, if every db supports tableInfo
$fetchmode = DB_FETCHMODE_ASSOC;
$res = $result->FetchRow($fetchmode);
$this->nested = False;
$i = 0;
while (list($key, $val) = each($res))
{
$tableInfo[$i]["table"]= $this->tagNameResult;
$tableInfo[$i]["name"] = $key;
$resFirstRow[$i] = $val;
$i++;
}
$res = $resFirstRow;
$FirstFetchDone = True;
$fetchmode = DB_FETCHMODE_ORDERED;
}
else
{
$FirstFetchDone = False;
$fetchmode = DB_FETCHMODE_ORDERED;
}
// initialize db hierarchy...
$parenttable = "root";
$tableInfo["parent_key"]["root"] = 0;
foreach ($tableInfo as $key => $value)
{
if (is_int($key))
{
// if the sql-query had a function the table starts with a # (only in mysql i think....), then give the field the name of the table before...
if (preg_match ("/^#/",$value["table"]) || strlen($value["table"]) == 0) {
$value["table"] = $tableInfo[($key - 1)]["table"] ;
$tableInfo[$key]["table"] = $value["table"];
}
if (!isset($tableInfo["parent_table"]) || is_null($tableInfo["parent_table"][$value]["table"]]))
{
$tableInfo["parent_key"][$value]["table"]] = $key;
$tableInfo["parent_table"][$value]["table"]] = $parenttable;
$parenttable = $value["table"] ;
}
}
//if you need more tableInfo for later use you can write a function addTableInfo..
$this->addTableInfo($key, $value, &$tableInfo);
}
// end initialize
// if user made some own tableInfo data, merge them here.
if ($this->user_tableInfo)
{
$tableInfo = $this->array_merge_clobber($tableInfo,$this->user_tableInfo);
}
$parent['root'] = $this->insertNewResult(&$tableInfo);
//initialize $resold to get rid of warning messages;
$resold[0] = "ThisValueIsImpossibleForTheFirstFieldInTheFirstRow";
while ($FirstFetchDone == True || $res = $result->FetchRow($fetchmode))
{
//FirstFetchDone is only for emulating tableInfo, as long as not all dbs support tableInfo. can go away later
$FirstFetchDone = False;
while (list($key, $val) = each($res))
{
if ($resold[$tableInfo]["parent_key"][$tableInfo][$key]["table"]]] != $res[$tableInfo]["parent_key"][$tableInfo][$key]["table"]]] || !$this->nested)
{
if ($tableInfo["parent_key"][$tableInfo][$key]["table"]] == $key )
{
if ($this->nested || $key == 0)
{
$parent[$tableInfo][$key]["table"]] = $this->insertNewRow($parent[$tableInfo]["parent_table"][$tableInfo][$key]["table"]]], $res, $key, &$tableInfo);
}
else
{
$parent[$tableInfo][$key]["table"]]= $parent[$tableInfo]["parent_table"][$tableInfo][$key]["table"]]];
}
//set all children entries to somethin stupid
foreach($tableInfo["parent_table"] as $pkey => $pvalue)
{
if ($pvalue == $tableInfo[$key]["table"])
{
$resold[$tableInfo]["parent_key"][$pkey]]= "ThisIsJustAPlaceHolder";
}
}
}
if ( $parent[$tableInfo][$key]["table"]] != Null)
{
$this->insertNewElement($parent[$tableInfo][$key]["table"]], $res, $key, &$tableInfo, &$subrow);
}
}
}
$resold = $res;
unset ($subrow);
}
return $this->xmldoc;
}
/**
* For adding whole arrays to $this->xmldoc
*
* @param array
* @param Object domNode
* @access private
* @see addArray()
*/
function DoArray2Xml ($array, $parent) {
while (list($key, $val) = each($array))
{
$tableInfo[$key]["table"]= $this->tagNameResult;
$tableInfo[$key]["name"] = $key;
}
if ($this->user_tableInfo)
{
$tableInfo = $this->array_merge_clobber($tableInfo,$this->user_tableInfo);
}
foreach ($array as $key=>$value)
{
if (is_array($value) ) {
if (is_int($key) )
{
$valuenew = array_slice($value,0,1);
$keynew = array_keys($valuenew);
$keynew = $keynew[0];
}
else
{
$valuenew = $value;
$keynew = $key;
}
$rec2 = $this->insertNewRow($parent, $valuenew, $keynew, &$tableInfo);
$this->DoArray2xml($value,$rec2);
}
else {
$this->insertNewElement($parent, $array, $key, &$tableInfo,&$subrow);
}
}
}
/**
* This method sets the options for the class
* One can only set variables, which are defined at the top of
* of this class.
*
* @param array options to be passed to the class
* @param boolean if the old suboptions should be deleted
* @access public
* @see $nested,$user_options,$user_tableInfo
*/
function setOptions($options,$delete = False) {
//set options
if (is_array($options))
{
foreach ($options as $option => $value)
{
if (isset($this->{$option}))

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

「你的組織要求你更改PIN訊息」將顯示在登入畫面上。當在使用基於組織的帳戶設定的電腦上達到PIN過期限制時,就會發生這種情況,在該電腦上,他們可以控制個人設備。但是,如果您使用個人帳戶設定了Windows,則理想情況下不應顯示錯誤訊息。雖然情況並非總是如此。大多數遇到錯誤的使用者使用個人帳戶報告。為什麼我的組織要求我在Windows11上更改我的PIN?可能是您的帳戶與組織相關聯,您的主要方法應該是驗證這一點。聯絡網域管理員會有所幫助!此外,配置錯誤的本機原則設定或不正確的登錄項目也可能導致錯誤。即

Windows11將清新優雅的設計帶到了最前沿;現代介面可讓您個性化和更改最精細的細節,例如視窗邊框。在本指南中,我們將討論逐步說明,以協助您在Windows作業系統中建立反映您的風格的環境。如何更改視窗邊框設定?按+開啟“設定”應用程式。 WindowsI前往個人化,然後按一下顏色設定。顏色變更視窗邊框設定視窗11「寬度=」643「高度=」500「>找到在標題列和視窗邊框上顯示強調色選項,然後切換它旁邊的開關。若要在「開始」功能表和工作列上顯示主題色,請開啟「在開始」功能表和工作列上顯示主題

預設情況下,Windows11上的標題列顏色取決於您選擇的深色/淺色主題。但是,您可以將其變更為所需的任何顏色。在本指南中,我們將討論三種方法的逐步說明,以更改它並個性化您的桌面體驗,使其具有視覺吸引力。是否可以更改活動和非活動視窗的標題列顏色?是的,您可以使用「設定」套用變更活動視窗的標題列顏色,也可以使用登錄編輯程式變更非活動視窗的標題列顏色。若要了解這些步驟,請前往下一部分。如何在Windows11中變更標題列的顏色? 1.使用「設定」應用程式按+開啟設定視窗。 WindowsI前往“個人化”,然

工作列縮圖可能很有趣,但它們也可能分散注意力或煩人。考慮到您將滑鼠懸停在該區域的頻率,您可能無意中關閉了重要視窗幾次。另一個缺點是它使用更多的系統資源,因此,如果您一直在尋找一種提高資源效率的方法,我們將向您展示如何停用它。不過,如果您的硬體規格可以處理它並且您喜歡預覽版,則可以啟用它。如何在Windows11中啟用工作列縮圖預覽? 1.使用「設定」應用程式點擊鍵並點選設定。 Windows按一下系統,然後選擇關於。點選高級系統設定。導航至“進階”選項卡,然後選擇“效能”下的“設定”。在「視覺效果」選

您是否在Windows安裝程式頁面上看到「出現問題」以及「OOBELANGUAGE」語句? Windows的安裝有時會因此類錯誤而停止。 OOBE表示開箱即用的體驗。正如錯誤提示所表示的那樣,這是與OOBE語言選擇相關的問題。沒有什麼好擔心的,你可以透過OOBE螢幕本身的漂亮註冊表編輯來解決這個問題。快速修復–1.點選OOBE應用底部的「重試」按鈕。這將繼續進行該過程,而不會再打嗝。 2.使用電源按鈕強制關閉系統。系統重新啟動後,OOBE應繼續。 3.斷開系統與網際網路的連接。在脫機模式下完成OOBE的所

在Windows11上的顯示縮放方面,我們都有不同的偏好。有些人喜歡大圖標,有些人喜歡小圖標。但是,我們都同意擁有正確的縮放比例很重要。字體縮放不良或圖像過度縮放可能是工作時真正的生產力殺手,因此您需要知道如何自訂以充分利用系統功能。自訂縮放的優點:對於難以閱讀螢幕上的文字的人來說,這是一個有用的功能。它可以幫助您一次在螢幕上查看更多內容。您可以建立僅適用於某些監視器和應用程式的自訂擴充功能設定檔。可以幫助提高低階硬體的效能。它使您可以更好地控制螢幕上的內容。如何在Windows11

螢幕亮度是使用現代計算設備不可或缺的一部分,尤其是當您長時間注視螢幕時。它可以幫助您減輕眼睛疲勞,提高易讀性,並輕鬆有效地查看內容。但是,根據您的設置,有時很難管理亮度,尤其是在具有新UI更改的Windows11上。如果您在調整亮度時遇到問題,以下是在Windows11上管理亮度的所有方法。如何在Windows11上變更亮度[10種方式解釋]單一顯示器使用者可以使用下列方法在Windows11上調整亮度。這包括使用單一顯示器的桌上型電腦系統以及筆記型電腦。讓我們開始吧。方法1:使用操作中心操作中心是訪問

Windows上的啟動過程有時會突然轉向顯示包含此錯誤代碼0xc004f069的錯誤訊息。雖然啟動程序已經聯機,但一些運行WindowsServer的舊系統可能會遇到此問題。透過這些初步檢查,如果這些檢查不能幫助您啟動系統,請跳到主要解決方案以解決問題。解決方法–關閉錯誤訊息和啟動視窗。然後,重新啟動電腦。再次從頭開始重試Windows啟動程序。修復1–從終端啟動從cmd終端啟動WindowsServerEdition系統。階段–1檢查Windows伺服器版本您必須檢查您使用的是哪種類型的W
