Go to the source code of this file.
Functions | |
| HFile_print_php_file ($tofile=1) | |
| get_categories () | |
| dump_linkscripts ($cats) | |
| dump_colours ($cats) | |
| dump_var ($variable, $name) | |
| dump_array ($array, $name) | |
| dump_hash ($hash, $name) | |
Variables | |
| $BEAUT_PATH = "/syntax_highlight/php" | |
| $file | |
| dump_array | ( | $ | array, | |
| $ | name | |||
| ) |
Definition at line 98 of file HFile_ueconv.php.
{
$first = 1;
print $name." = array(";
foreach($array as $a)
{
if (!$first) print ", "; else $first = 0;
print "\"".addslashes($a)."\"";
}
print ");\n";
}
| dump_colours | ( | $ | cats | ) |
Definition at line 81 of file HFile_ueconv.php.
References dump_array().
{
global $colours;
$usedcols = array();
foreach($cats as $c)
{
array_push($usedcols, $colours[$c-1]);
}
dump_array($usedcols, "\$colours ");
}
Here is the call graph for this function:| dump_hash | ( | $ | hash, | |
| $ | name | |||
| ) |
Definition at line 110 of file HFile_ueconv.php.
{
$first = 1;
print $name." = array(";
foreach(array_keys($hash) as $k)
{
if (!$first) print ", "; else $first = 0;
print "\n \"".addslashes($k)."\"";
print " => \"".addslashes($hash[$k])."\"";
}
print ");\n";
}
?>
<html><title>Configuration Converter</title><body>
<h1>Important Note</h1>
<p>This script should <b>not</b> be run on a public server. It is possible to access files other than syntax highlight files (by entering /etc/passwd, for example). Although this should not display anything useful, it is still possible that important data may be extractable. As such, only run this script <b>locally</b> (it should not be necessary to run it on a public server, anyway).</p>
<form action="HFileconv.php">Please specify a syntax file to convert:<br />
<input type="text" width="64" size="64" name="file" value="<?php print $file; ?>" /><br />
Save to:<br />
<input type="text" width="64" size="64" name="fileout" value="<?php print stripslashes($fileout); ?>" /><br />
<input type="submit" /></form><hr />
<pre>
<?php
if (isset($fileout) && $fileout == "") unset($fileout);
if (isset($file) && file_exists($file))
{
HFile_parse_file($file);
ob_start();
HFile_print_php_file(isset($fileout));
$out = ob_get_contents();
if (isset($fileout))
{
$fd = fopen($fileout, "w");
fputs($fd, $out);
fclose($fd);
}
ob_end_flush();
}
| dump_linkscripts | ( | $ | cats | ) |
Definition at line 61 of file HFile_ueconv.php.
References dump_hash().
{
print "
// Each category can specify a PHP function that returns an altered
// version of the keyword.
# This link is then placed in a <a href=\"...\">foo</a>; structure around keyword 'foo' - which is
\n\n";
$linkhash = array();
foreach($cats as $c)
{
$linkhash{$c} = "donothing";
}
dump_hash($linkhash, "\$linkscripts ");
print "\n# DoNothing link function\n\n";
print "function donothing(\$keywordin)\n{\n return \$keywordin;\n}\n";
}
Here is the call graph for this function:| dump_var | ( | $ | variable, | |
| $ | name | |||
| ) |
Definition at line 93 of file HFile_ueconv.php.
{
print $name." = \"".addslashes($variable)."\";\n";
}
| get_categories | ( | ) |
Definition at line 48 of file HFile_ueconv.php.
References $keywords.
{
global $keywords;
$usedcats = array();
foreach(array_keys($keywords) as $k)
{
$cat = $keywords[$k];
if (!in_array($cat, $usedcats)) array_push($usedcats, $cat);
}
return $usedcats;
}
| HFile_print_php_file | ( | $ | tofile = 1 |
) |
Definition at line 10 of file HFile_ueconv.php.
References $keywords, dump_array(), dump_colours(), dump_hash(), dump_linkscripts(), dump_var(), and get_categories().
{
global $indent, $unindent, $stringchars, $config, $keywords, $delimiters, $lang_name;
global $linecommenton, $blockcommenton, $blockcommentoff;
global $perl, $nocase, $notrim;
if ($tofile) print "<?php\n"; else print "<?\n";
print "######################################\n";
print "# Beautifier Highlighting Configuration File \n";
print "# $lang_name\n";
print "######################################\n";
print "# Flags\n\n";
dump_var($nocase, "\$nocase ");
dump_var($notrim, "\$notrim ");
dump_var($perl, "\$perl ");
print "\n# Colours\n\n";
$used_categories = get_categories();
dump_colours($used_categories);
dump_var("blue", "\$quotecolour ");
dump_var("green", "\$blockcommentcolour");
dump_var("green", "\$linecommentcolour ");
print "\n# Indent Strings\n\n";
dump_array($indent, "\$indent ");
dump_array($unindent, "\$unindent ");
print "\n# String characters and delimiters\n\n";
dump_array($stringchars, "\$stringchars ");
dump_array($delimiters, "\$delimiters ");
dump_var ($escchar, "\$escchar ");
print "\n# Comment settings\n\n";
dump_var ($linecommenton, "\$linecommenton ");
dump_var ($blockcommenton, "\$blockcommenton ");
dump_var ($blockcommentoff, "\$blockcommentoff ");
print "\n# Keywords (keyword mapping to colour number)\n\n";
dump_hash ($keywords, "\$keywords ");
print "\n# Special extensions\n";
dump_linkscripts($used_categories);
if ($tofile) print "\n?>"; else print "\n?>";
}
Here is the call graph for this function:| $BEAUT_PATH = "/syntax_highlight/php" |
Definition at line 2 of file HFile_ueconv.php.
| print $file |
Definition at line 128 of file HFile_ueconv.php.
Referenced by ilFileDataMail::__deleteAttachmentDirectory(), ilFileDataChat::__deleteOld(), ilForum::__deletePostFiles(), ilCronClients::__readClients(), ilFileDataImportMail::__readFiles(), ilFileDataImportGroup::__readFiles(), ilFileDataImportForum::__readFiles(), ilObjMediaObjectGUI::_getMediaInfoHTML(), Magic::_is_ascii(), ilObjFile::_lookupFileSize(), ilFileDataMail::adoptAttachments(), ilObjMediaObjectGUI::assignFullscreenObject(), ilObjMediaObjectGUI::assignStandardObject(), ilTestExport::buildExportResultFile(), ilFileDataMail::checkFilesExist(), ilFileDataForum::checkFilesExist(), ilFileDataExercise::checkFilesExist(), ilObjGlossaryGUI::confirmDeleteExportFile(), ilObjContentObjectGUI::confirmDeleteExportFile(), ilObjSurveyQuestionPoolGUI::confirmDeleteExportFileObject(), ilObjSurveyGUI::confirmDeleteExportFileObject(), ilObjUserFolderGUI::confirmDeleteExportFileObject(), ilObjTestGUI::confirmDeleteExportFileObject(), ilObjQuestionPoolGUI::confirmDeleteExportFileObject(), convert(), Core::Core(), ilPCMediaObjectGUI::create(), ilObjUserFolder::createCSVExport(), ilObjUserFolder::createXMLExport(), ilUtil::delDir(), ilFileDataForum::delete(), ilFileDataExercise::delete(), ilObjGlossaryGUI::deleteExportFile(), ilObjContentObjectGUI::deleteExportFile(), ilObjSurveyQuestionPoolGUI::deleteExportFileObject(), ilObjSurveyGUI::deleteExportFileObject(), ilObjUserFolderGUI::deleteExportFileObject(), ilObjTestGUI::deleteExportFileObject(), ilObjQuestionPoolGUI::deleteExportFileObject(), ilFileSystemGUI::deleteFile(), ilObjMediaObjectGUI::deleteFileObject(), ilObjExerciseGUI::deliverObject(), ilExerciseMembers::deliverReturnedFiles(), ilObjGlossaryGUI::downloadExportFile(), ilObjContentObjectGUI::downloadExportFile(), ilLMPresentationGUI::downloadExportFile(), ilGlossaryPresentationGUI::downloadExportFile(), ilLMPresentationGUI::downloadFile(), ilGlossaryPresentationGUI::downloadFile(), ilFileSystemGUI::downloadFile(), ilObjExerciseGUI::downloadFileObject(), ilObjTestGUI::downloadFileObject(), ilObjQuestionPoolGUI::downloadFileObject(), ilExerciseMembers::downloadSelectedFiles(), ilObjExerciseGUI::editObject(), ilObjGlossary::exportHTML(), ilObjContentObject::exportHTML(), ilObjGlossary::exportHTMLGlossaryTerms(), ilObjContentObject::exportHTMLGlossaryTerms(), ilObjGlossary::exportHTMLMOB(), ilObjContentObject::exportHTMLMOB(), ilObjContentObject::exportPageHTML(), ilObjStyleSheet::exportXML(), ilFileSystemGUI::extCommand(), ilObjAICCCourseInterchangeFiles::findFiles(), ilObjAICCCourseInterchangeFiles::getAllFiles(), ilStyleDefinition::getAllTemplates(), ilObjContentObject::getAvailableLayouts(), ilCtrl::getClassForClasspath(), getCSV(), ilObjSurveyQuestionPool::getExportFiles(), ilObjSurvey::getExportFiles(), ilObjGlossary::getExportFiles(), ilObjContentObject::getExportFiles(), ilObjUserFolder::getExportFiles(), ilObjTest::getExportFiles(), ilObjQuestionPool::getExportFiles(), ilFileExplorer::getFiles(), ilFileDataForum::getFiles(), ilFileDataExercise::getFiles(), ilFileDataForum::getFilesOfPost(), ilObjMediaObjectGUI::getFullscreenSizeObject(), ilMediaItem::getMapWorkCopyName(), ilObjContentObject::getOfflineFiles(), ilMediaItem::getOriginalSize(), ilObjMediaObjectGUI::getStandardSizeObject(), ilFileDataMail::getUnsentFiles(), ilObjFile::getUploadFile(), ilLMPresentationGUI::handleCodeParagraph(), ilSCORMPackageParser::handlerBeginTag(), ilContObjParser::handlerEndTag(), ilBMFAttachment::ilBMFAttachment(), ilFileDataForum::ilClone(), ilFileDataExercise::ilClone(), ilTemplate::ilTemplate(), ilObjGlossaryGUI::importFileObject(), ilObjContentObjectGUI::importFileObject(), ilCron::initLog(), parse(), ilLangVarAnalyzer::parseFiles(), php4DOMDocument::php4DOMDocument(), ilLangVarAnalyzer::printOthers(), ilObjGlossaryGUI::publishExportFile(), ilObjContentObjectGUI::publishExportFile(), ilUtil::rCopy(), ilCtrlStructureReader::read(), OLE::read(), removePicture(), ilFileSystemGUI::renameFileForm(), ilObjMediaObjectGUI::resizeImagesObject(), ilUtil::rRenameSuffix(), ilObjMediaObjectGUI::saveObject(), ilObjMediaObjectGUI::savePropertiesObject(), ilObjSCORMValidator::searchDir(), ilObjExercise::send(), ilObjFile::sendFile(), ilCtrlStructureReader::store(), PHPlot::tile_img(), ilFileDataMail::unlinkFiles(), ilFileDataForum::unlinkFiles(), ilFileDataExercise::unlinkFiles(), ilUtil::unzip(), ilFileSystemGUI::unzipFile(), ilObjMediaObjectGUI::uploadFileObject(), ilObjSAHSLearningModuleGUI::uploadObject(), ilObjQuestionPoolGUI::uploadQplObject(), ilObjSurveyQuestionPoolGUI::uploadSplObject(), ilObjTestGUI::uploadTstObject(), ilObjSCORMValidator::validateXML(), ilObjExerciseGUI::viewObject(), ilXmlWriter::xmlDumpFile(), and ilUtil::zip().
1.7.1