ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_ueconv.php File Reference

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 = "/Services/COPage/syntax_highlight/php"
print $file

Function Documentation

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.

{
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 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 "&lt;?\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?&gt;";
}

+ Here is the call graph for this function:

Variable Documentation

$BEAUT_PATH = "/Services/COPage/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 ilForum\__deletePostFiles(), ilObjBibliographic\__force_rmdir(), ilFileDataImportMail\__readFiles(), ilFileDataImportGroup\__readFiles(), ilStyleMigration\_addMissingStyleClassesToAllStyles(), ilObjStyleSheet\_addMissingStyleClassesToAllStyles(), ilUploadFiles\_copyUploadFile(), System\_dirToStruct(), Log\_format(), ilExport\_generateIndexFile(), ilStyleDefinition\_getAllTemplates(), Log\_getBacktraceVars(), ilExport\_getExportFiles(), ilObjMediaObjectGUI\_getMediaInfoHTML(), ilObjUser\_getPersonalPicturePath(), ilUploadFiles\_getUploadFiles(), Magic\_is_ascii(), ilObjFileAccess\_lookupFileSize(), ilObjFileAccess\_lookupFileSizeFromFilesystem(), System\_multipleToStruct(), ilBookmarkImportExport\_parseFile(), TCPDF_IMAGES\_parsejpeg(), TCPDF_IMAGES\_parsepng(), TCPDF\_putfonts(), TCPDF\_putimages(), ilObjMediaObject\_saveTempFileAsMediaObject(), HTMLPurifier_DefinitionCache_Serializer\_write(), HTMLPurifier_DefinitionCache_Serializer\add(), ilSoapFileAdministration\addFile(), TCPDF\AddFont(), ilTemplate\addILIASFooter(), TCPDF_FONTS\addTTFfont(), ilFileDataMail\adoptAttachments(), ilPCFileList\afterPageUpdate(), ilObjFileBasedLMGUI\afterSave(), ilTestPlayerAbstractGUI\archiveParticipantSubmission(), ilObjMediaObjectGUI\assignFullscreenObject(), ilObjMediaObjectGUI\assignStandardObject(), HTMLPurifier_Bootstrap\autoload(), Slim\autoload(), ilDBGenerator\buildDBGenerationScript(), HTMLPurifier_ConfigSchema_InterchangeBuilder\buildDir(), ilPortfolioHTMLExport\buildExportFile(), ilTestExport\buildExportResultFile(), HTMLPurifier_ConfigSchema_InterchangeBuilder\buildFile(), SeqTreeBuilder\buildNodeSeqTree(), System\cat(), ilFileDataShop\checkFilesExist(), ilFileDataMail\checkFilesExist(), ilPropertyFormGUI\checkInput(), ilSessionFile\cloneFiles(), ilObjSession\cloneObject(), ilContainer\cloneObject(), ilTermsOfServiceAgreementByLanguageProvider\collectData(), ilMemberExportGUI\confirmDeleteExportFile(), ilObjUserFolderGUI\confirmDeleteExportFileObject(), ilObjSessionGUI\confirmDeleteFilesObject(), ilObjCourseGUI\confirmDeleteInfoFilesObject(), ilObjExerciseGUI\confirmRemoveTeamMemberObject(), convert(), Core\Core(), ilTestArchiver\countFilesInDirectory(), HTMLPurifier_LanguageFactory\create(), ilPCInteractiveImageGUI\create(), ilObjUserFolder\createCSVExport(), ilDidacticTemplateSettingsGUI\createImportForm(), ilUtil\CreateIsoFromFolder(), ilObjMediaPoolGUI\createMediaFromUploadDir(), ilFileUtils\createObjects(), ilObjExternalToolsSettingsGUI\createSocialBookmarkObject(), ilObjUserFolder\createXMLExport(), ilUpdateUtilsMailMigration\delDir(), ilUpdateUtils\delDir(), ilUtil\delDir(), ilFileDataForum\delete(), ilExportGUI\delete(), ilObjSession\delete(), ilRestFileStorage\deleteDeprecated(), ilMemberExportGUI\deleteExportFile(), ilSCORM2004ScoGUI\deleteExportFile(), ilObjSCORM2004LearningModuleGUI\deleteExportFile(), ilObjSurveyQuestionPoolGUI\deleteExportFileObject(), ilObjSurveyGUI\deleteExportFileObject(), ilObjUserFolderGUI\deleteExportFileObject(), ilObjGroup\deleteExportFiles(), ilDataCollectionRecord\deleteFile(), ilFileSystemGUI\deleteFile(), ilObjMediaObjectGUI\deleteFileObject(), ilObjSessionGUI\deleteFilesObject(), assImagemapQuestion\deleteImage(), ilObjCourseGUI\deleteInfoFilesObject(), ilObjTestVerificationGUI\deliver(), ilObjExerciseVerificationGUI\deliver(), ilObjCourseVerificationGUI\deliver(), ilObjSCORMVerificationGUI\deliver(), ilMemberExportGUI\deliverData(), ilObjExerciseGUI\deliverFileObject(), ilBookingObjectGUI\deliverInfo(), ilNewsItem\deliverMobFile(), ilBookingObjectGUI\deliverPostFile(), ilTermsOfServiceFileSystemDocument\determine(), ilObjFile\determineFileSize(), ilObjMediaCastGUI\determinePlaytimeObject(), ilSoapUtils\distributeMails(), ilCalendarCategoryGUI\doImportFile(), HTMLPurifier_URIScheme_data\doValidate(), ilExportGUI\download(), ilObjPortfolioGUI\downloadExcAssFile(), ilObjBlogGUI\downloadExcAssFile(), ilMemberExportGUI\downloadExportFile(), ilSCORM2004ScoGUI\downloadExportFile(), ilGlossaryPresentationGUI\downloadExportFile(), ilObjGroup\downloadExportFile(), ilLMPresentationGUI\downloadExportFile(), ilObjSurveyQuestionPoolGUI\downloadExportFileObject(), ilObjSurveyGUI\downloadExportFileObject(), ilObjUserFolderGUI\downloadExportFileObject(), ilObjExerciseGUI\downloadFeedbackFileObject(), ilFileSystemGUI\downloadFile(), ilSCORM2004ScoGUI\downloadFile(), ilGlossaryPresentationGUI\downloadFile(), ilPageObjectGUI\downloadFile(), ilLMPresentationGUI\downloadFile(), ilObjQuestionPoolGUI\downloadFileObject(), ilObjExerciseGUI\downloadFileObject(), ilObjTestGUI\downloadFileObject(), ilObjContentObjectGUI\downloadPDFFile(), ilObjExerciseGUI\downloadPeerReviewObject(), ilSCORM2004ScoGUI\downloadResource(), ilObjCourseGUI\editInfoObject(), ilObjSessionGUI\editObject(), getid3_lib\EmbeddedLookup(), phpCAS\error(), ilObjFileBasedLMGUI\executeCommand(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilObjGlossary\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLGlossaryTerms(), ilCOPageHTMLExport\exportHTMLMOB(), ilObjGlossary\exportHTMLMOB(), ilObjContentObject\exportHTMLMOB(), ilObjBlogGUI\exportHTMLPages(), ilCOPageHTMLExport\exportPageElements(), ilWikiHTMLExport\exportPageHTML(), ilObjContentObject\exportPageHTML(), ilObjStyleSheetGUI\exportStyleObject(), ilObjStyleSheet\exportXML(), ilFileSystemGUI\extCommand(), MDB2\fileExists(), ilTemplate\fillJavascriptFile(), ilTemplate\fillJavaScriptFiles(), ilMediaCastTableGUI\fillRow(), ilExcDeliveredFilesTableGUI\fillRow(), ilExAssignmentListTextTableGUI\fillRow(), ilObjAICCCourseInterchangeFiles\findFiles(), Slim\generateErrorMarkup(), ilObjMediaObject\generatePreviewPic(), assSingleChoice\generateThumbForFile(), assMultipleChoice\generateThumbForFile(), assKprimChoice\generateThumbForFile(), assOrderingQuestion\generateThumbForFile(), assMatchingQuestion\generateThumbForFile(), HTMLPurifier_DefinitionCache_Serializer\get(), ilObjAICCCourseInterchangeFiles\getAllFiles(), ilFileDataMail\getAttachmentPathByMD5Filename(), ilModule\getAvailableCoreModules(), ilService\getAvailableCoreServices(), ilPlugin\getAvailableLangFiles(), ilObjContentObject\getAvailableLayouts(), Securimage\getBackgroundFromDirectory(), ilCtrl\getClassForClasspath(), ilObjFileDAV\getContentOutputStream(), ilObjFileDAV\getContentOutputStreamLength(), ilObjFileDAV\getContentStream(), ilObjMediaCastGUI\getDuration(), ilObjPortfolioGUI\getExerciseInfo(), ilObjBlogGUI\getExerciseInfo(), ilObjUserFolder\getExportFiles(), ilObjSurveyQuestionPool\getExportFiles(), ilSCORM2004Asset\getExportFiles(), ilObjSCORM2004LearningModule\getExportFiles(), ilObjContentObject\getExportFiles(), ilObjSurvey\getExportFiles(), ilExAssignment\getFeedbackFilePath(), ilFSStorageExercise\getFeedbackFiles(), ilObjFile\getFile(), ilVerificationObject\getFilePath(), ilFSStorageExercise\getFiles(), ilSoapFileAdministration\getFileXML(), ilPlayerUtil\getFlashVideoPlayerFilename(), TCPDF\getFontsList(), ilObjMediaObjectGUI\getFullscreenSizeObject(), getID3\getHashdata(), TCPDF_STATIC\getHyphenPatternsFromTEX(), ilPreview\getImages(), ilObjQuestionPoolGUI\getImportQuestionsForm(), ilMediaItem\getMapWorkCopyName(), ilPersonalSkillsGUI\getMaterialInfo(), ilFSStorageGroup\getMemberExportFiles(), ilFileDataCourse\getMemberExportFiles(), ilFSStorageCourse\getMemberExportFiles(), ilObjContentObject\getOfflineFiles(), ilExAssignmentGUI\getOverviewBody(), HTMLPurifier_Bootstrap\getPath(), getPhpSourceCodePositionInfo(), ilPlugin\getPluginObject(), ilPluginSlot\getPluginsInformation(), Securimage\getRandomNoiseFile(), ilObjMediaObjectGUI\getStandardSizeObject(), ilFileDataMail\getUnsentFiles(), ilObjFile\getUploadFile(), ilCOPageExporter\getXmlExportHeadDependencies(), ilFileExporter\getXmlRepresentation(), ilExerciseXMLWriter\handleAssignmentFiles(), ilLMPresentationGUI\handleCodeParagraph(), ilObjSessionGUI\handleFileUpload(), ilSCORMPackageParser\handlerBeginTag(), ilContObjParser\handlerEndTag(), getid3_lib\hash_data(), HTTP_WebDAV_Server\http_PROPFIND(), ilObjectFeedWriter\ilObjectFeedWriter(), ilTemplate\ilTemplate(), TCPDF\Image(), TCPDF\ImageEps(), TCPDF\ImagePngAlpha(), TCPDF\ImageSVG(), ilObjStyleSheet\import(), ilCertificate\importCertificate(), ilDataCollectionRecordListGUI\importExcel(), ilObjGlossaryGUI\importFileObject(), ilObjSurveyQuestionPoolGUI\importFileObject(), ilObjContentObject\importFromZipFile(), ilDataCollectionRecordListGUI\importRecords(), ilSCORM2004ScoGUI\importSave(), ilDidacticTemplateSettingsGUI\importTemplate(), ilObjCourseGUI\infoScreen(), ilObjMediaCastGUI\initAddCastItemForm(), ilObjBlogGUI\initEditCustomForm(), ilObjPortfolioBaseGUI\initEditCustomForm(), ilBookingObjectGUI\initForm(), ilAdvancedMDSettingsGUI\initImportForm(), ilObjCourseGUI\initInfoEditor(), ilObjFileGUI\initPropertiesForm(), ilPCSourceCodeGUI\initPropertyForm(), ilObjPollGUI\initQuestionForm(), ilADTFactory\initTypeClass(), ilCloudPluginUploadGUI\initUploadForm(), ilObjSAHSLearningModuleGUI\initUploadForm(), IT_Error\IT_Error(), ilFileSystemGUI\listFiles(), ilDataLoader\loadSqlTemplate(), ilObjSurvey\locateImportFiles(), getid3_lib\md5_file(), ilObjGroupGUI\membersGalleryObject(), ilObjiLincCourseGUI\membersGalleryObject(), ilObjCourseGUI\membersGalleryObject(), assQuestion\moveUploadedMediaFile(), ilObjSCORMLearningModuleGUI\newModuleVersion(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilCSVReader\open(), ilDBGenerator\openFile(), ilExAssignmentListTextTableGUI\parse(), ilDataCollectionDatatype\parseExportValue(), HTMLPurifier_StringHashParser\parseFile(), HTMLPurifier_StringHashParser\parseMultiFile(), ilDataCollectionDatatype\parseValue(), php4DOMDocument\php4DOMDocument(), ilFileUtils\processZipFile(), ilObjGlossaryGUI\publishExportFile(), ilObjContentObjectGUI\publishExportFile(), ilObjSCORM2004LearningModuleGUI\publishExportFile(), Auth_RADIUS\putConfigfile(), ilAppEventHandler\raise(), ilUtil\rangeDownload(), ilUtil\rCopy(), ilCtrlStructureReader\read(), OLE\read(), ilSetup\readDump(), ilPropertyFormGUI\rebuildUploadedFiles(), ilFileUtils\recursive_dirscan(), HTMLPurifier_DefinitionCache_Serializer\remove(), ilObjMediaObject\removeAdditionalFile(), ilObjUser\removeUserPicture(), ilObjUserGUI\removeUserPictureObject(), ilFileSystemGUI\renameFileForm(), ilPortfolioPageGUI\renderVerification(), HTMLPurifier_DefinitionCache_Serializer\replace(), ilObjMediaObjectGUI\resizeImagesObject(), System\rm(), TCPDF\rollbackTransaction(), ilUtil\rRenameSuffix(), ilBookingObjectGUI\save(), ilObjMediaCastGUI\saveCastItemObject(), ilObjMediaObjectGUI\savePropertiesObject(), ilObjSCORMValidator\searchDir(), ilObjExercise\sendAssignment(), ilObjFile\sendFile(), ilObjSessionGUI\sendFileObject(), ilObjCourseGUI\sendFileObject(), ilObjUser\sendPersonalDataFile(), HTMLPurifier_DefinitionCache_Serializer\set(), Auth_RADIUS\setConfigfile(), ilObjMediaObjectGUI\setObjectPerCreationForm(), HTMLPurifier_EntityLookup\setup(), getid3_lib\sha1_file(), ilObjComponentSettingsGUI\showPlugin(), SOAP_Attachment\SOAP_Attachment(), Spreadsheet_Excel_Reader\Spreadsheet_Excel_Reader(), ilForumXMLWriter\start(), ilOrgUnitSimpleImportGUI\startImport(), ilOrgUnitSimpleUserImportGUI\startImport(), ilArrayTableDataParser\startParsing(), ilCtrlStructureReader\store(), ilObjFile\storeUnzipedFile(), ilFileDataMail\storeUploadedFile(), ilObjExerciseGUI\submitBlog(), ilObjExerciseGUI\submitPortfolio(), assQuestionGUI\suggestedsolution(), ilGlobalSuite\suite(), PHPlot\tile_img(), ilFileDataForum\unlinkFiles(), ilFileDataMail\unlinkFiles(), ilUtil\unzip(), ilSetup\unzip(), ilFileSystemGUI\unzipFile(), ilBookingObjectGUI\update(), ilPCInteractiveImageGUI\update(), ilObjMediaCastGUI\updateCastItemObject(), ilSoapFileAdministration\updateFile(), ilObjMediaCastGUI\updateMediaItem(), ilObjExternalToolsSettingsGUI\updateSocialBookmarkObject(), ilCalendarCategoryGUI\uploadAppointments(), ilCloudPluginUploadGUI\uploadDirectory(), ilChatroomUploadFileTask\uploadFile(), ilObjMediaObjectGUI\uploadFileObject(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjLanguageExtGUI\uploadObject(), ilObjQuestionPoolGUI\uploadQplObject(), ilObjTestGUI\uploadTstObject(), ilObjSCORMValidator\validateXML(), vd(), HTML_Template_ITX\warning(), System\which(), ilDataLoader\writeCategoryCsv(), ilDataLoader\writeCourseCsv(), ilPortfolioHTMLExport\writeExportFile(), ilObjBlogGUI\writeExportFile(), MDB2_Driver_Datatype_oci8\writeLOBToFile(), MDB2_Driver_Datatype_Common\writeLOBToFile(), ilDataLoader\writeUserCsv(), ilTestResultsToXML\xmlDumpFile(), ilXmlWriter\xmlDumpFile(), and ilUtil\zip().