Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1068187
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 16, 11:15 PM
Size
15 KB
Mime Type
text/x-diff
Expires
Fri, Jul 18, 11:15 PM (2 h, 59 m)
Engine
blob
Format
Raw Data
Handle
691248
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/tools/tool_lib.php
===================================================================
--- trunk/tools/tool_lib.php (revision 3403)
+++ trunk/tools/tool_lib.php (nonexistent)
@@ -1,54 +0,0 @@
-<?php
-
- /*
- * $tool_db - connection to in-portal database
- * TABLE_PREFIX - prefix for each table in that db
- * BASE_PATH - path to in-portal root directory
- */
-
- // all things tool need to survive
- define('CONFIG_FILE','../config.php');
-
- require_once '../kernel/include/db.class.php';
-
- // get db connection information from config
- $db_info=Array();
- $file=file(CONFIG_FILE);
- foreach($file as $line)
- {
- if( substr($line,0,2) == 'DB' )
- {
- preg_match('/(.*) = "(.*)"/',$line,$rets);
- $db_info[$rets[1]]=$rets[2];
- }
- elseif( substr($line,0,5) == 'Table' )
- {
- preg_match('/(.*) = "(.*)"/',$line,$rets);
- define('TABLE_PREFIX',$rets[2]);
- }
- }
-
- // connect to in-portal database
- $tool_db=new DBConnection($db_info['DBType']);
- $tool_db->Connect($db_info['DBHost'],$db_info['DBUser'],$db_info['DBUserPassword'],$db_info['DBName']);
-
- $sub_folder=$tool_db->GetOne('SELECT VariableValue FROM '.TABLE_PREFIX.'ConfigurationValues WHERE VariableName=\'Site_Path\'');
- define('BASE_PATH', $_SERVER['DOCUMENT_ROOT'].rtrim($sub_folder,'/'));
- unset($sub_folder);
-
- /**
- * Same as print_r, but for html pages
- *
- * @param string $s
- * @param bool $returnResult
- * @return string
- * @access public
- */
- function tool_printPre($s,$returnResult=false)
- {
- $ret='<pre>'.print_r($s,true).'</pre>';
- if($returnResult) return $ret;
- echo $ret;
- }
-
-?>
\ No newline at end of file
Property changes on: trunk/tools/tool_lib.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/tools/xml2txt.php
===================================================================
--- trunk/tools/xml2txt.php (revision 3403)
+++ trunk/tools/xml2txt.php (nonexistent)
@@ -1,70 +0,0 @@
-<?php
- define('BASE_PATH', $_SERVER['DOCUMENT_ROOT'].'/in-portal');
-
- define('DIR_PREFIX',BASE_PATH.'/admin/export');
- define('SRC_NAME', BASE_PATH.'/admin/export/arabic.lang');
- define('DST_NAME', BASE_PATH.'/admin/export/arabic.txt');
-
- require_once BASE_PATH.'/kernel/include/xml.php';
-
- $xml2txt_map=Array( 'DATEFORMAT'=>'DateFormat','TIMEFORMAT'=>'TimeFormat',
- 'DECIMAL'=>'Decimal','THOUSANDS'=>'Thousands',
- 'CHARSET'=>'Charset');
-
- $fp = fopen(SRC_NAME,'r');
- $xml = fread($fp,filesize(SRC_NAME));
- fclose($fp);
-
- $objInXML = new xml_doc($xml);
- unset($xml);
- $objInXML->parse();
- $objInXML->getTag(0,$name,$attribs,$contents,$tags);
-
- $fp=fopen(DST_NAME,'w');
-
- foreach($tags as $t)
- {
- $LangRoot =& $objInXML->getTagByID($t);
- fwrite($fp,'PackName='.$LangRoot->attributes['PACKNAME']."\n");
-
- foreach($LangRoot->children as $tag)
- {
- switch($tag->name)
- {
- case 'PHRASES':
- $tag_index = 0; $tag_count = count($tag->children);
- while($tag_index < $tag_count)
- {
- $inner_tag =& $tag->children[$tag_index];
- $Phrase = $inner_tag->attributes['LABEL'];
- $Translation = $inner_tag->contents;
- $PhraseType = $inner_tag->attributes['TYPE'];
- fwrite($fp,'P_='.$Phrase.';'.$Translation.';'.$PhraseType."\n");
- $tag_index++;
- }
- break;
-
- case 'EVENTS':
- $tag_index = 0; $tag_count = count($tag->children);
- while($tag_index < $tag_count)
- {
- $inner_tag =& $tag->children[$tag_index];
- $event = $inner_tag->attributes["EVENT"];
- $MsgType = strtolower($inner_tag->attributes["MESSAGETYPE"]);
- $template = $inner_tag->contents;
- $Type = $inner_tag->attributes["TYPE"];
-
- fwrite($fp,'E_='.$event.';'.$template.';'.$Type.';'.$MsgType."\n");
- $tag_index++;
- }
- break;
-
- default:
- fwrite($fp,$xml2txt_map[$tag->name].'='.base64_encode($tag->contents)."\n");
- break;
- }
- }
- }
-
- fclose($fp);
-?>
\ No newline at end of file
Property changes on: trunk/tools/xml2txt.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/tools/launchinIE.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/tools/launchinIE.dll
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/tools/flush_tables.php
===================================================================
--- trunk/tools/flush_tables.php (revision 3403)
+++ trunk/tools/flush_tables.php (nonexistent)
@@ -1,27 +0,0 @@
-<?php
-
- require_once 'tool_lib.php';
-
- switch ($_REQUEST['action'])
- {
- case 'drop':
- $sql_prefix='DROP TABLE IF EXISTS';
- break;
-
- case 'delete':
- $sql_prefix='DELETE FROM';
- break;
-
- default:
- $sql_prefix='';
- break;
- }
- if(!$sql_prefix) die('Specify valid action');
-
- $tables=$tool_db->GetCol('SHOW TABLES LIKE \''.TABLE_PREFIX.'%\'');
- foreach($tables as $table)
- {
- $tool_db->Query($sql_prefix.' '.$table);
- }
-
-?>
\ No newline at end of file
Property changes on: trunk/tools/flush_tables.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/tools/phrase_locator.php
===================================================================
--- trunk/tools/phrase_locator.php (revision 3403)
+++ trunk/tools/phrase_locator.php (nonexistent)
@@ -1,89 +0,0 @@
-<?php
- require_once 'tool_lib.php';
- $phrases = Array();
- $phrase_files = Array();
-
- scanDir(BASE_PATH.'/');
-
- $sql = 'SELECT LOWER(Phrase) FROM '.TABLE_PREFIX.'Phrase WHERE LanguageId = 1';
- $db_phrases = $tool_db->GetCol($sql);
- foreach ($db_phrases as $phrase)
- {
- unset($phrases[$phrase]); // phrase is translated
- if( !isset($phrase_files[$phrase]) )
- {
- unset($phrase_files[$phrase]);
- }
- else
- {
- echo 'inconsistance in phrase <b>'.$phrase.'</b><br>';
- }
- }
-
- $ret = Array();
- foreach($phrases as $phrase => $dummy_value)
- {
- $ret[] = $phrase;
- }
-
- tool_printPre($ret);
- tool_printPre($phrase_files);
-
- if( unlink(BASE_PATH.'/new_phrases.txt') )
- {
- $fp = fopen(BASE_PATH.'/new_phrases.txt','w');
- foreach ($ret as $phrase)
- {
- fwrite($fp,$phrase."\n");
- }
- fclose($fp);
- }
- else
- {
- die('Can\'t create file <b>new_phrases.txt</b>');
- }
-
-
- function addPhrase($array, $file)
- {
- global $phrases, $phrase_files;
-
- foreach ($array as $phrase_name)
- {
- $phrase_name = strtolower($phrase_name);
- $phrases[$phrase_name] = 1;
- if( !isset($phrase_files[$phrase_name]) ) $phrase_files[$phrase_name] = Array();
- $phrase_files[$phrase_name][] = substr($file, strlen(BASE_PATH), strlen($file) );
- }
- }
-
- function scanDir($FolderPath)
- {
- $scan_types = Array('php','js','tpl');
- $FolderHandle = opendir($FolderPath);
- if($FolderHandle)
- {
- while( false !== ($file = readdir($FolderHandle)) )
- {
- if($file == '.' || $file == '..') continue;
- $file = $FolderPath.$file;
-
- if( is_dir($file) )
- {
- scanDir($file.'/');
- }
- elseif( is_file($file) && in_array(substr($file,-3),$scan_types) )
- {
- $filedata = file_get_contents($file);
-
- preg_match_all('/\'(lu_.*|la_.*)\'/U',$filedata,$rets);
- if($rets[1]) addPhrase($rets[1], $file);
-
- preg_match_all('/"(lu_.*|la_.*)"/U',$filedata,$rets);
- if($rets[1]) addPhrase($rets[1], $file);
- }
- }
- closedir($FolderHandle);
- }
- }
-?>
\ No newline at end of file
Property changes on: trunk/tools/phrase_locator.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.6
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/tools/explang.php
===================================================================
--- trunk/tools/explang.php (revision 3403)
+++ trunk/tools/explang.php (nonexistent)
@@ -1,26 +0,0 @@
-<?php
-/* tag library builder */
-/* initalize the in-portal system */
-chdir("../");
-include_once("kernel/startup.php");
-LogEntry("System Init Complete\n");
-$fp = fopen($pathtoroot."tools/inportal.lang","w");
-$ado = &GetADODBConnection();
-
-$objLanguages->Query_Item("SELECT * FROM ".$objLanguages->SourceTable);
-foreach($objLanguages->Items as $l)
-{
- fputs($fp,"[".$l->Get("PackName")."|".$l->Get("LocalName")."]\n");
- $sql = "SELECT * FROM ".GetTablePrefix()."Phrase WHERE LanguageId=".$l->Get("LanguageId");
- $rs=$ado->Execute($sql);
- while($rs && ! $rs->EOF)
- {
- $s = " ".$rs->fields["Phrase"]."=".$rs->fields["PhraseType"].",".$rs->fields["Translation"]."\n";
- fputs($fp,$s);
- $rs->MoveNext();
- }
-}
-
-fclose($fp);
-?>
-
Property changes on: trunk/tools/explang.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/tools/launchinIE.reg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/tools/launchinIE.reg
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/tools/pi.php
===================================================================
--- trunk/tools/pi.php (revision 3403)
+++ trunk/tools/pi.php (nonexistent)
@@ -1,8 +0,0 @@
-<?php
- $address = gethostbyaddr( $_SERVER['REMOTE_ADDR'] );
- $parts = explode('.', $address);
- if( $parts && $parts[ count($parts) - 2 ] == 'intechnic' )
- {
- phpinfo();
- }
-?>
\ No newline at end of file
Property changes on: trunk/tools/pi.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/tools/taglib.php
===================================================================
--- trunk/tools/taglib.php (revision 3403)
+++ trunk/tools/taglib.php (nonexistent)
@@ -1,109 +0,0 @@
-<?php
-/* tag library builder */
-/* initalize the in-portal system */
-chdir("../");
-include_once("kernel/startup.php");
-LogEntry("System Init Complete\n");
-
-include_once($pathtoroot."kernel/include/tag-class.php");
-
-$objTagList = new clsTagList();
-
-if($_GET["Parse"]=="1")
-{
- $objTagList->DeleteTags();
- $t = new clsTagFunction();
- $t->Set("name","include");
- $t->Set("description","insert template output into the current template");
- $t->Create();
- $t->AddAttribute("_template","tpl","Template to insert","",TRUE);
- $t->AddAttribute("_supresserror","bool","Supress missing template errors","",FALSE);
- $t->AddAttribute("_dataexists","bool","Only include template output if content exists (content is defined by the tags in the template)","",FALSE);
- $t->AddAttribute("_nodatatemplate","tpl","Template to include if the nodataexists condition is true","",FALSE);
- unset($t);
-
- $t = new clsTagFunction();
- $t->Set("name","perm_include");
- $t->Set("description","insert template output into the current template if permissions are set");
- $t->Create();
- $t->AddAttribute("_template","tpl","Template to insert","",TRUE);
- $t->AddAttribute("_noaccess","tpl","Template to insert if access is denied","",FALSE);
- $t->AddAttribute("_permission","","Comma-separated list of permissions, any of which will grant access","",FALSE);
- $t->AddAttribute("_module","","Used in place of the _permission attribute, this attribute verifies the module listed is enabled","",FALSE);
- $t->AddAttribute("_system","bool","Must be set to true if any permissions in _permission list is a system permission","",FALSE);
- $t->AddAttribute("_supresserror","bool","Supress missing template errors","",FALSE);
- $t->AddAttribute("_dataexists","bool","Only include template output if content exists (content is defined by the tags in the template)","",FALSE);
- $t->AddAttribute("_nodatatemplate","tpl","Template to include if the nodataexists condition is true","",FALSE);
- unset($t);
-
- $t = new clsTagFunction();
- $t->Set("name","mod_include");
- $t->Set("description","insert templates from all enabled modules. No error occurs if the template does not exist.");
- $t->Create();
- $t->AddAttribute("_template","tpl","Template to insert. This template path should be relative to the module template root directory","",TRUE);
- $t->AddAttribute("_modules","","Comma-separated list of modules. Defaults to all enabled modules if not set","",FALSE);
- $t->AddAttribute("_supresserror","bool","Supress missing template errors","",FALSE);
- $t->AddAttribute("_dataexists","bool","Only include template output if content exists (content is defined by the tags in the template)","",FALSE);
- $t->AddAttribute("_nodatatemplate","tpl","Template to include if the nodataexists condition is true","",FALSE);
-
- //$objTagList->ParseFile($pathtoroot."kernel/parser.php");
- //$objTagList->ParseFile($pathtoroot."in-bulletin/parser.php");
- //$objTagList->ParseFile($pathtoroot."in-link/parser.php");
- //$objTagList->ParseFile($pathtoroot."in-news/parser.php");
- if(is_array($ParserFiles))
- {
- foreach($ParserFiles as $file)
- {
- $objTagList->ParseFile($pathtoroot.$file);
- }
- }
- if(is_array($ItemTagFiles))
- {
- foreach($ItemTagFiles as $file)
- {
- $objTagList->ParseItemFile($pathtoroot.$file);
- }
- }
-
-}
-
-$objTagList->Clear();
-$objTagList->Query_Item("SELECT * FROM ".$objTagList->SourceTable);
-
-if($objTagList->NumItems()>0)
-{
- foreach($objTagList->Items as $i)
- {
- $i->LoadAttribs();
- //echo " ".$i->attribs->NumItems()." Attributes<br>\n";
- if(strlen($i->Get("name")))
- {
- echo "<TABLE border=1 width=\"100%\">";
- echo "<TR><TD>";
- if($i->Get("scope")!="global")
- {
- echo "<b>".$i->Get("scope").".".$i->Get("name")."</b>";
- }
- else
- echo "<B>".$i->Get("name")."</b>";
- echo "</TD><TD align=\"right\" width=\"100%\">";
- echo $i->Get("example")."</td></tr>";
- echo "<TR><TD colspan=2>";
- echo "<i>".$i->Get("description")."</i></td></tr>";
- if($i->attribs->NumItems()>0)
- {
- echo "<TR><TD colspan=2 valign=\"top\">";
- echo "Attributes:<br>\n";
- //echo "<PRE>";print_r($i->attribs->Items); echo "</PRE>";
- echo "<TABLE border=0 width=\"100%\">";
- foreach($i->attribs->Items as $a)
- {
- echo "<TR><TD valign=\"top\">".$a->Get("Name")."[".$a->Get("AttrType")."]</TD><TD> ".$a->Get("Description")."</td></tr>";
- }
- echo "</TABLE>";
- }
- echo "</TD></TR></TABLE>";
- }
- }
-}
-?>
Property changes on: trunk/tools/taglib.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Event Timeline
Log In to Comment