本文整理汇总了PHP中xml::get_tag_content方法的典型用法代码示例。如果您正苦于以下问题:PHP xml::get_tag_content方法的具体用法?PHP xml::get_tag_content怎么用?PHP xml::get_tag_content使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xml
的用法示例。
在下文中一共展示了xml::get_tag_content方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: opendir
switch ($_GET['step']) {
// List designs
default:
// Open design-dir
$design_dir = opendir("design/");
// Check all Subdirs of $design_dir for valid design-xml-files
$t_array = array();
while ($akt_design = readdir($design_dir)) {
if ($akt_design != '.' and $akt_design != '..' and $akt_design != '.svn' and $akt_design != 'templates' and $akt_design != 'images') {
$file = "design/{$akt_design}/design.xml";
if (file_exists($file)) {
$xml_file = "";
$handle = fopen($file, "rb");
$xml_file = fread($handle, filesize($file));
fclose($handle);
$name = $xml->get_tag_content('name', $xml_file);
$description = $xml->get_tag_content('description', $xml_file);
$version = $xml->get_tag_content('version', $xml_file);
$author = $xml->get_tag_content('author', $xml_file);
$contact = $xml->get_tag_content('contact', $xml_file);
$website = $xml->get_tag_content('website', $xml_file);
$comments = $xml->get_tag_content('comments', $xml_file);
$dsp->AddDoubleRow("<a href=\"index.php?mod=install&action=design&step=10&des={$akt_design}\">{$name} (Version: {$version})<br />{$description}</a>", "{$author} [{$contact}]<br /><a href=\"http://{$website}\" target=\"_blank\">{$website}</a>");
}
}
}
break;
// List designs templates
// List designs templates
case 10:
$dsp->AddSingleRow("<a href=\"index.php?mod=install&action=design&step=11&des={$_GET['des']}&file=index\">index.php</a>");
示例2: array
if (!$DoSignon and !$quick_signon) {
// Settings
if ($auth['type'] >= 2 or !$_GET['userid'] or $auth['userid'] == $_GET['userid'] and ($cfg['user_self_details_change'] or $missing_fields)) {
if ($cfg['user_design_change']) {
$selections = array();
$selections[''] = t('System-Vorgabe');
include_once "inc/classes/class_xml.php";
$xml = new xml();
$ResDesign = opendir('design/');
while ($dir = readdir($ResDesign)) {
if (is_dir("design/{$dir}") and file_exists("design/{$dir}/design.xml") and $dir != 'beamer') {
$file = "design/{$dir}/design.xml";
$ResFile = fopen($file, "rb");
$XMLFile = fread($ResFile, filesize($file));
fclose($ResFile);
$DesignName = $xml->get_tag_content('name', $XMLFile);
$selections[$dir] = $DesignName;
}
}
closedir($ResDesign);
$mf->AddField(t('Design'), 'design', IS_SELECTION, $selections, FIELD_OPTIONAL);
}
$mf->AddField(t('Mich auf der Karte zeigen') . '|' . t('Meine Adresse in der Besucherkarte anzeigen?'), 'show_me_in_map', '', '', FIELD_OPTIONAL);
$mf->AddField(t('LS-Mail Alert') . '|' . t('Mir eine E-Mail senden, wenn eine neue LS-Mail eingegangen ist'), 'lsmail_alert', '', '', FIELD_OPTIONAL);
if ($cfg['user_avatarupload']) {
$mf->AddField(t('Avatar'), 'avatar_path', IS_FILE_UPLOAD, 'ext_inc/avatare/' . $_GET['userid'] . '_', FIELD_OPTIONAL, 'CheckAndResizeUploadPic');
}
$mf->AddField(t('Signatur'), 'signature', '', LSCODE_ALLOWED, FIELD_OPTIONAL);
$mf->AddGroup(t('Einstellungen'));
}
}
示例3: array
}
asort($selections);
$selections = array('0' => t('Kein WWCL-Support für dieses Turnier')) + $selections;
$mf->AddField(t('WWCL-Spiel'), 'wwcl_gameid', IS_SELECTION, $selections, FIELD_OPTIONAL, 'CheckModeForWWCLLeague');
// NGL-Spiel auswahl
$xml_file = "";
$file = "ext_inc/tournament_rules/games.xml";
$handle = fopen($file, "rb");
$xml_file = fread($handle, filesize($file));
fclose($handle);
$selections = array();
# and $cfg["sys_country"] != "at" and $cfg["sys_country"] != "ch"
if ($cfg["sys_country"] != "de") {
$mf->AddField(t('NGL-Support ist nur für Partys in Deutschland möglich. Das Land deiner Party kannst du auf der Adminseite einstellen'), 'ngl_gamename', IS_TEXT_MESSAGE, t('NGL-Support ist nur in Deutschland, Österreich, oder der Schweiz möglich. Das Land deiner Party kannst du auf der Adminseite einstellen'));
} else {
$country_xml = $xml->get_tag_content("country short=\"{$cfg["sys_country"]}\"", $xml_file);
$liga_xml = $xml->get_tag_content_array("league", $xml_file);
while ($akt_liga = array_shift($liga_xml)) {
$info_xml = $xml->get_tag_content_array("info", $akt_liga);
while ($akt_info = array_shift($info_xml)) {
$info_title = $xml->get_tag_content("title", $akt_info);
}
$game_xml = $xml->get_tag_content_array("game", $akt_liga);
if (is_array($game_xml)) {
while ($game_xml_id = array_shift($game_xml)) {
$akt_game_id = $xml->get_tag_content("short", $game_xml_id);
$akt_game_name = $xml->get_tag_content("title", $game_xml_id);
$selections[$akt_game_id] = $info_title . ' - ' . $akt_game_name;
}
}
}
示例4: xml
<?php
include_once "inc/classes/class_xml.php";
$xml = new xml();
$xml_file = @fopen("design/" . $auth["design"] . "/design.xml", "r");
$xml_content = @fread($xml_file, filesize("design/" . $auth["design"] . "/design.xml"));
$design_name = $xml->get_tag_content("name", $xml_content);
$dsp->NewContent("Designinfo zu '<b>{$design_name}</b>'", "Auf dieser Seite erhälst du Informationen über das derzeitige Lansuite-Erscheinungsbild");
$dsp->AddDoubleRow("Name", $design_name);
$dsp->AddDoubleRow("Version", $xml->get_tag_content("version", $xml_content));
$dsp->AddDoubleRow("Beschreibung", $xml->get_tag_content("description", $xml_content));
$dsp->AddDoubleRow("Autor", $xml->get_tag_content("author", $xml_content));
$dsp->AddDoubleRow("Kontakt", $xml->get_tag_content("contact", $xml_content));
$dsp->AddDoubleRow("Website", $xml->get_tag_content("website", $xml_content));
$dsp->AddDoubleRow("Kommentar", $xml->get_tag_content("comments", $xml_content));
$dsp->AddBackButton("index.php?mod=about", "about/design");
$dsp->AddContent();
示例5: opendir
// Open the design-dir
$design_dir = opendir("design/");
include_once "inc/classes/class_xml.php";
$xml = new xml();
// Check all Subdirs of $design_dir fpr valid design-xml-files
$t_array = array();
while ($akt_design = readdir($design_dir)) {
if ($akt_design != "." and $akt_design != ".." and $akt_design != ".svn" and $akt_design != "templates") {
$file = "design/{$akt_design}/design.xml";
if (file_exists($file)) {
// Read Names from design.xml
$xml_file = fopen($file, "r");
$xml_content = fread($xml_file, filesize($file));
if ($xml_content != "") {
$config['lansuite']['default_design'] == $akt_design ? $selected = "selected" : ($selected = "");
array_push($t_array, "<option {$selected} value=\"{$akt_design}\">" . $xml->get_tag_content("name", $xml_content) . "</option>");
}
fclose($xml_file);
}
}
}
$dsp->AddDropDownFieldRow("design", t('Standard-Design'), $t_array, "");
$dsp->AddCheckBoxRow("resetdb", t('Datenbank überschreiben'), t('ACHTUNG: Eventuell vorhandene Daten in der oben angegeben Datenbank gehen verloren!'), "", 0, "");
$func->information(t('ACHTUNG: Der Aufruf der nächsten Seite kann bis zu einer Minute in Anspruch nehmen! Bitte in dieser Zeit den Ladevorgang nicht abbrechen!'), NO_LINK);
$dsp->AddFormSubmitRow(t('Weiter'));
$dsp->AddBackButton("index.php?mod=install&action=wizard&step=1", "install/ls_conf");
$dsp->AddContent();
break;
// Writing ls_conf & try to create DB-Strukture
// Writing ls_conf & try to create DB-Strukture
case 3: