Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Jun 24, 11:28 PM

in-portal

Index: branches/unlabeled/unlabeled-1.14.2/kernel/admin_templates/category_selector.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.14.2/kernel/admin_templates/category_selector.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.14.2/kernel/admin_templates/category_selector.tpl (revision 5023)
@@ -0,0 +1,156 @@
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<inp2:c_InitList list_name="cats" per_page="-1"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+
+<inp2:m_ParseBlock name="blue_bar" prefix="c" title_preset="category_list" module="in-commerce" icon="icon46_categories"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ set_hidden_field('remove_specials[<inp2:c_ListMarker list_name="cats"/>]',1);
+ submit_event('<inp2:m_get name="main_prefix"/>','OnSelectItems');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ window.close();
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton( new ToolBarButton('upcat', '<inp2:m_phrase label="la_ToolTip_Up" escape="1"/>', function() {
+ submit_event('c', 'OnCategoryUp');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('homecat', '<inp2:m_phrase label="la_ToolTip_Home" escape="1"/>', function() {
+ submit_event('c', 'OnGoHome');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ function edit()
+ {
+ // required for correct row selection
+ }
+ </script>
+
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_block name="category_td" />
+ <td valign="top" class="table_white text" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:Field field="ResourceId"/>">
+ <input type="radio" name="<inp2:InputName field="$IdField" IdField="$IdField"/>" id="<inp2:InputName field="$IdField" IdField="$IdField"/>">
+ <img src="<inp2:ModulePath />img/itemicons/<inp2:ItemIcon grid="Default"/>">&nbsp;<span class="priority"><inp2:m_if prefix="$PrefixSpecial" function="fieldequals" field="Priority" value="0"/><inp2:m_else/><sup><inp2:$PrefixSpecial_field field="Priority"/></sup><inp2:m_endif/></span>
+ <a class="link" href="<inp2:CategoryLink pass="all"/>"><b><inp2:field field="Name"/></b></a><span class="cat_desc">:</span>
+ <span class="cat_pick"><inp2:m_if check="IsPick"/>Pick<inp2:m_endif/></span>
+ <span class="cat_new"><inp2:m_if check="IsNew"/>New<inp2:m_endif/></span>
+ <span class="cats_stats">(<inp2:SubCatCount/> / <inp2:ItemCount/>)</span><br>
+ <div style="padding-left:3px">
+ <span class="cat_desc"><inp2:field field="Description"/></span><br>
+ <span class="cats_stats">(<inp2:field field="CreatedOn" format="_regional_DateFormat"/>)</span>
+ </div>
+ </td>
+<inp2:m_blockend />
+
+<inp2:m_block name="root_cat_caption" />
+ <inp2:m_if prefix="m" function="paramequals" param="current" value="1"/><script type="text/javascript">
+ a_toolbar.DisableButton('upcat');
+ a_toolbar.DisableButton('homecat');
+ </script><span class="NAV_CURRENT_ITEM" ><inp2:m_else/><span class="NAV_CURRENT_ITEM"><a class="control_link" href="<inp2:m_t m_cat_id="0" pass="all"/>"><inp2:m_endif/><inp2:c_RootCategoryName/><inp2:m_if prefix="m" function="paramequals" param="current" value="1"/><inp2:m_else/></a><inp2:m_endif/></span>
+<inp2:m_blockend />
+
+<inp2:m_block name="category_caption" />
+ <inp2:m_param name="separator"/> <inp2:m_if prefix="m" function="paramequals" param="current" value="1"/><span class="NAV_CURRENT_ITEM" ><inp2:m_else/><span class="NAV_CURRENT_ITEM"><a class="control_link" href="<inp2:m_t m_cat_id="$cat_id" pass="all"/>"><inp2:m_endif/><inp2:m_param name="cat_name"/><inp2:m_if prefix="m" function="paramequals" param="current" value="1"/><inp2:m_else/></a><inp2:m_endif/></span>
+<inp2:m_blockend />
+
+<table class="toolbar" cellspacing="0" cellpadding="2" width="100%" border="0" class="tableborder_full_a">
+ <tbody>
+ <tr bgcolor="#e0e0da" height="20">
+ <td width="100%">
+ <img height="15" src="<inp2:m_getconst name="PROTOCOL"/><inp2:m_getconst name="SERVER_NAME"/><inp2:m_getconst name="BASE_PATH"/>/admin/images/arrow.gif" width="15" align="middle" border="0">
+ <inp2:c_CategoryPath separator="&gt;" rootcatblock="root_cat_caption" rootmoduleblock="category_caption" currentblock="category_caption" block="category_caption"/>
+ </td>
+ <td align="right">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td>Search:&nbsp;</td>
+ <td><input type="text"
+ id="<inp2:c_ListMarker list_name="cats"/>_search_keyword"
+ name="<inp2:c_ListMarker list_name="cats"/>_search_keyword"
+ value="<inp2:c_SearchKeyword list_name="cats"/>"
+ PrefixSpecial="<inp2:c_ListMarker list_name="cats"/>"
+ Grid="Default"
+ style="border: 1px solid grey;">
+ <inp2:m_recall var="c_search_keyword" no_null="no_null" special="1"/>
+ </td>
+ <td>
+ <script type="text/javascript">
+ document.getElementById('<inp2:c_ListMarker list_name="cats"/>_search_keyword').onkeydown = search_keydown;
+ Toolbars['<inp2:c_ListMarker list_name="cats"/>_search'] = new ToolBar('icon16_');
+ Toolbars['<inp2:c_ListMarker list_name="cats"/>_search'].AddButton( new ToolBarButton('search', 'Search', function() { search('<inp2:c_ListMarker list_name="cats"/>','Default') } ) );
+ Toolbars['<inp2:c_ListMarker list_name="cats"/>_search'].AddButton( new ToolBarButton('search_reset', 'Reset', function() { search_reset('<inp2:c_ListMarker list_name="cats"/>') } ) );
+ Toolbars['<inp2:c_ListMarker list_name="cats"/>_search'].Render();
+ </script>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<inp2:m_block name="row_start" />
+ <tr>
+<inp2:m_blockend />
+
+<inp2:m_block name="row_end" />
+ </tr>
+<inp2:m_blockend />
+
+<inp2:m_block name="no_categories" />
+ <tr><td><span class="cat_desc">No Categories</span></td></tr>
+<inp2:m_blockend />
+
+<br><table border="0" width="100%">
+ <inp2:c_CategoryList list_name="cats" block_main="category_td" block_row_start="row_start" block_row_end="row_end" columns="2" direction="V" IdField="ResourceId"/>
+ <!-- <inp2:c_PrintList2 block="category_td" per_page="9" columns="2" direction="V" row_start_block="row_start" row_end_block="row_end" IdField="ResourceId" /> -->
+</table></br>
+<script type="text/javascript" src="incs/fw_menu.js"></script>
+<script type="text/javascript">
+ Grids['<inp2:c_ListMarker list_name="cats"/>'] = new Grid('<inp2:c_ListMarker list_name="cats"/>', 'table_white_selected', ':original', edit, a_toolbar);
+ Grids['<inp2:c_ListMarker list_name="cats"/>'].RadioMode = true;
+ Grids['<inp2:c_ListMarker list_name="cats"/>'].DblClick = function() {return false};
+ Grids['<inp2:c_ListMarker list_name="cats"/>'].AddItemsByIdMask('td', /^<inp2:c_ListMarker list_name="cats" as_preg="1"/>_([0-9-]+)/, '<inp2:c_ListMarker list_name="cats" />[$$ID$$][ResourceId]');
+ Grids['<inp2:c_ListMarker list_name="cats"/>'].InitItems();
+
+ <inp2:c_ViewMenu block="viewmenu_declaration" grid="Default"/>
+ $ViewMenus = new Array('<inp2:c_ListMarker list_name="cats"/>');
+
+
+</script>
+
+<inp2:m_block name="product_caption_td" />
+ <td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid"/>
+ <span class="priority"><inp2:m_if prefix="$PrefixSpecial" function="fieldequals" field="Priority" value="0"/><inp2:m_else/><sup><inp2:$PrefixSpecial_field field="Priority"/></sup><inp2:m_endif/></span></td>
+<inp2:m_blockend />
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.14.2/kernel/admin_templates/category_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.14
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.14.2/admin/config/addtheme.php
===================================================================
--- branches/unlabeled/unlabeled-1.14.2/admin/config/addtheme.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.14.2/admin/config/addtheme.php (revision 5023)
@@ -0,0 +1,214 @@
+<?php
+##############################################################
+##In-portal ##
+##############################################################
+## In-portal ##
+## Intechnic Corporation ##
+## All Rights Reserved, 1998-2002 ##
+## ##
+## No portion of this code may be copied, reproduced or ##
+## otherwise redistributed without proper written ##
+## consent of Intechnic Corporation. Violation will ##
+## result in revocation of the license and support ##
+## privileges along maximum prosecution allowed by law. ##
+##############################################################
+
+// new startup: begin
+define('REL_PATH', 'admin/config');
+$relation_level = count( explode('/', REL_PATH) );
+define('FULL_PATH', realpath(dirname(__FILE__) . str_repeat('/..', $relation_level) ) );
+require_once FULL_PATH.'/kernel/startup.php';
+// new startup: end
+
+/* set the destination of the image upload, relative to the root path */
+$DestDir = 'kernel/images/';
+
+$pathtolocal = $pathtoroot."kernel/";
+require_once ($pathtoroot.$admin."/include/elements.php");
+require_once ($pathtoroot."kernel/admin/include/navmenu.php");
+require_once ($pathtolocal."admin/include/navmenu.php");
+require_once($pathtoroot.$admin."/browse/toolbar.php");
+require_once($pathtoroot.$admin."/listview/listview.php");
+
+$m = GetModuleArray();
+foreach($m as $key=>$value)
+{
+ $path = $pathtoroot. $value."admin/include/parser.php";
+ if(file_exists($path))
+ {
+ include_once($path);
+ }
+}
+
+
+unset($objEditItems);
+
+$objEditItems = new clsThemeList();
+$objEditItems->SourceTable = $objSession->GetEditTable("Theme");
+$objEditItems->EnablePaging = FALSE;
+
+if ($_GET["new"] == 1)
+{
+ $c = new clsTheme(NULL);
+ $en = 0;
+ $action = "m_theme_add";
+ $name = prompt_language("la_Text_NewTheme");
+ $objThemes->CreateEmptyEditTable("ThemeId");
+}
+else
+{
+ $en = (int)$_GET["en"];
+ if (isset($_POST["itemlist"]))
+ {
+ $objThemes->CopyToEditTable("ThemeId",$_POST["itemlist"]);
+ }
+ $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
+ $itemcount=$objEditItems->NumItems();
+
+ $c = $objEditItems->GetItemByIndex($en);
+
+ if($itemcount>1)
+ {
+ if ($en+1 == $itemcount)
+ $en_next = -1;
+ else
+ $en_next = $en+1;
+
+ if ($en == 0)
+ $en_prev = -1;
+ else
+ $en_prev = $en-1;
+ }
+ $action = "m_theme_edit";
+ $name = $c->Get("Name");
+}
+
+$section = "in-portal:theme_general";
+
+$envar = "env=".BuildEnv();
+
+$title = GetTitle("la_Text_Theme", "la_tab_General", $c->Get('ThemeId'), $c->Get('Name'));//prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Theme")." -'".$name."'";
+
+//Display header
+$sec = $objSections->GetSection($section);
+$objCatToolBar = new clsToolBar();
+$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',1);","/toolbar/tool_select.gif");
+$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
+
+if ( isset($en_prev) || isset($en_next) )
+{
+ $url = $RootUrl.$admin."/config/addtheme.php";
+ $StatusField = "ThemeEditStatus";
+ $form = "theme";
+ MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"));
+ $objCatToolBar->Add("divider");
+}
+
+ int_header($objCatToolBar,NULL,$title);
+ $c->Data=inp_htmlize($c->Data);
+
+if ($objSession->GetVariable("HasChanges") == 1) {
+?>
+<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
+ <tr>
+ <td valign="top">
+ <?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
+ </td>
+ </tr>
+</table>
+<?php } ?>
+<FORM enctype="multipart/form-data" ID="theme" NAME="theme" method="POST" ACTION="">
+<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
+<?php int_subsection_title(prompt_language("la_tab_General")); ?>
+
+<TR <?php int_table_color(); ?> >
+ <TD><?php echo prompt_language("la_prompt_ThemeId"); ?></TD>
+ <TD><?php echo $c->Get("ThemeId"); ?></TD>
+ <TD></TD>
+</TR>
+
+<TR <?php int_table_color(); ?> >
+ <TD><SPAN id="prompt_name" CLASS="text"><?php echo prompt_language("la_prompt_Name"); ?></SPAN></TD>
+ <TD><input type=text ValidationType="theme_name" NAME="name" VALUE="<?php echo $c->Get("Name"); ?>"></TD>
+ <TD></TD>
+</TR>
+
+<TR <?php int_table_color(); ?> >
+ <TD><SPAN id="prompt_description"><?php echo prompt_language("la_prompt_Description"); ?></SPAN></TD>
+ <TD><input type=text NAME="description" VALUE="<?php echo $c->Get("Description"); ?>"></TD>
+ <TD></TD>
+</TR>
+
+<tr <?php int_table_color(); ?>>
+ <td valign="top" class="text"><?php echo prompt_language("la_prompt_Enabled"); ?></td>
+ <td>
+ <input type="checkbox" id="enabled_prompt" name="enabled_prompt" class="text" value="1" <?php if($c->Get("Enabled") == 1) echo "checked "; if($c->Get("PrimaryTheme") == 1) echo 'disabled ';?> onchange="align_enabled_value()">
+ <input type="hidden" id="enabled" name="enabled" class="text" <?php echo 'value="'.$c->Get("Enabled").'"'; ?>>
+ </td>
+ <td class="text">&nbsp;</td>
+</tr>
+
+ <tr <?php int_table_color(); ?>>
+ <td valign="top" class="text"><?php echo prompt_language("la_prompt_lang_cache_timeout"); ?></td>
+ <td>
+ <input type=text NAME="CacheTimeout" VALUE="<?php echo $c->Get("CacheTimeout"); ?>">
+ </td>
+ <td class="text">&nbsp;</td>
+</tr>
+
+
+<tr <?php int_table_color(); ?>>
+ <td valign="top" class="text"><?php echo prompt_language('la_prompt_Stylesheet'); ?></td>
+ <td>
+ <select name="StylesheetId">
+ <option value="0"></option>
+ <?php
+ $db =& GetADODBConnection();
+ $tpl = '<option value="%s"%s>%s</option>';
+ $rs = $db->Execute('SELECT StylesheetId, Name FROM '.GetTablePrefix().'Stylesheets WHERE Enabled = 1 ORDER BY Name');
+ while(!$rs->EOF)
+ {
+ $rec =& $rs->fields;
+ $checked = $rec['StylesheetId'] == $c->Get('StylesheetId') ? ' selected' : '';
+ echo sprintf($tpl, $rec['StylesheetId'], $checked, $rec['Name']);
+ $rs->MoveNext();
+ }
+ ?>
+ </select>
+ </td>
+ <td class="text">&nbsp;</td>
+</tr>
+
+<tr <?php int_table_color(); ?>>
+ <td valign="top" class="text"><?php echo prompt_language("la_prompt_Primary"); ?></td>
+ <td>
+ <input type="checkbox" name="primary_prompt" id="primary_prompt" class="text" value="1" <?php if($c->Get("PrimaryTheme") == 1) echo 'checked disabled';
+ elseif (!$c->Get("ThemeId")) echo 'disabled'; ?> onchange="align_primary_value()">
+ <input type="hidden" name="primary" id="primary" <?php echo 'value="'.$c->Get("PrimaryTheme").'"'; ?>>
+ </td>
+ <td class="text">&nbsp;</td>
+ <input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
+ <INPUT TYPE="hidden" NAME="ThemeId" VALUE="<?php echo $c->Get("ThemeId"); ?>">
+ <input TYPE="HIDDEN" NAME="DataType" VALUE="<?php echo $DataType; ?>">
+ <input type="hidden" name="ThemeEditStatus" VALUE="0">
+</FORM>
+</tr>
+<FORM>
+<TR <?php int_table_color(); ?> >
+ <td colspan="3">
+
+ </td>
+</tr>
+</FORM>
+</TABLE>
+
+<!-- CODE FOR VIEW MENU -->
+<form method="post" action="user_groups.php?<?php echo $envar; ?>" name="viewmenu">
+<input type="hidden" name="fieldname" value="">
+<input type="hidden" name="varvalue" value="">
+<input type="hidden" name="varvalue2" value="">
+<input type="hidden" name="Action" value="">
+</form>
+<!-- END CODE-->
+
+<?php int_footer(); ?>
Property changes on: branches/unlabeled/unlabeled-1.14.2/admin/config/addtheme.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.14
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.14.2/core/kernel/parser/template.php
===================================================================
--- branches/unlabeled/unlabeled-1.14.2/core/kernel/parser/template.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.14.2/core/kernel/parser/template.php (revision 5023)
@@ -0,0 +1,181 @@
+<?php
+
+class Template {
+ var $Body = '';
+ var $BasePath = '';
+ var $Filename = '';
+
+ function Template($base_path=null, $filename=null, $silent=0)
+ {
+ if ($this->SetBasePath($base_path)) {
+ if (isset($filename)) {
+ $this->Filename = $filename;
+ $this->LoadTemplate($silent);
+ }
+ }
+ }
+
+ function SetBasePath($base_path=null)
+ {
+ if (isset($base_path)) {
+ $base_path = eregi_replace("/$", '', $base_path); //Cutting possible last slash
+ $this->BasePath = $base_path;
+ return true;
+ }
+ return false;
+ }
+
+ function GetFullPath()
+ {
+ return $this->BasePath.'/'.ltrim($this->Filename, '/').'.tpl';
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param int $silent template not found {0 - fatal error, 1 - warning, 2 - nothing}
+ * @return bool
+ */
+ function LoadTemplate($silent = 0)
+ {
+ $filename = $this->GetFullPath();
+ if(file_exists($filename)) {
+ if (filesize ($filename) == 0) {
+ trigger_error("Template file size is 0: <b>$filename</b>", ($silent ? E_USER_NOTICE : E_USER_ERROR) );
+ }
+
+ $this->SetBody(file_get_contents($filename));
+ /*$handle = fopen ($filename, "r");
+ $contents = fread ($handle, filesize ($filename));
+ $this->SetBody($contents);
+ fclose ($handle);*/
+ return true;
+ }
+ else {
+ if ($silent != 2) {
+ trigger_error("File or block not found: <b>$filename</b>", ($silent ? E_USER_NOTICE : E_USER_ERROR) );
+ }
+ return false;
+ }
+ }
+
+ function SetBody($body)
+ {
+ $this->Body = $body;
+ }
+
+ function GetBody()
+ {
+ return $this->Body;
+ }
+}
+
+class TemplatesCache extends kBase {
+ var $Templates = Array();
+ var $BasePath;
+ var $FileNames = Array();
+
+ function TemplatesCache()
+ {
+ parent::kBase();
+ $this->BasePath = FULL_PATH.THEMES_PATH;
+
+ $conn =& $this->Application->GetADODBConnection();
+ }
+
+ function LoadTemplate($filename, $title=NULL, $silent=0)
+ {
+ if (preg_match('#^[\/]{0,1}([^\/]*)\/(.*)#', $filename, $regs)) {
+ $module_filename = $regs[2];
+ $first_dir = $regs[1];
+ }
+ else {
+ $first_dir = '';
+ $module_filename = $filename;
+ }
+
+ if ( $this->Application->IsAdmin() && $this->Application->findModule('Name', $first_dir)) {
+ $path = MODULES_PATH.'/'.strtolower($first_dir).'/admin_templates';
+ }
+ else {
+ $path = $this->BasePath;
+ $module_filename = $first_dir.'/'.$module_filename;
+ }
+
+ $template =& new Template($path, $module_filename, $silent);
+ if (!isset($title)) $title = $filename;
+ $this->SetTemplate($title, $template);
+ }
+
+ function GetRealFilename($filename, $base=null) {
+ if (preg_match('#^[\/]{0,1}([^\/]*)\/(.*)#', $filename, $regs)) {
+ $module_filename = $regs[2];
+ $first_dir = $regs[1];
+ }
+ else {
+ $first_dir = '';
+ $module_filename = $filename;
+ }
+
+ if ( $this->Application->IsAdmin() && $this->Application->findModule('Name', $first_dir)) {
+ $path = MODULES_PATH.'/'.strtolower($first_dir).'/admin_templates';
+ }
+ else {
+ $path = isset($base) ? $base : $this->BasePath;
+ $module_filename = $first_dir.'/'.$module_filename;
+ }
+ return $path.'/'.$module_filename;
+ }
+
+ function SetTemplate($title, &$template, $filename=null)
+ {
+ if (!isset($filename)) $filename=$title;
+ $this->Templates[$title] = $template;
+ $this->FileNames[$title] = $filename;
+ }
+
+ function &GetTemplate($title, $silent=0)
+ {
+ if (!isset($this->Templates[$title])) {
+ $this->LoadTemplate($title, null, $silent);
+ }
+ return $this->Templates[$title];
+ }
+
+ function GetTemplateBody($title, $silent=0)
+ {
+ $template =& $this->GetTemplate($title, $silent);
+ if ( !is_object($template) ) {
+ return '';
+ }
+ return $template->GetBody();
+ }
+
+ function GetTemplateFileName($title)
+ {
+ return getArrayValue($this->FileNames, $title);
+ }
+
+ function SetTemplateBody($title, $body)
+ {
+ $template =& new Template();
+ $template->SetBody($body);
+ $this->SetTemplate($title, $template);
+ }
+
+ function ParseTemplate($template_name)
+ {
+ $Parser =& new TemplateParser($this->Application);
+ return $Parser->Parse( $this->GetTemplateBody($template_name) );
+ }
+
+ function TemplateExists($filename)
+ {
+ if (!preg_match("/\.tpl$/", $filename)) $filename .= '.tpl';
+ $real_file = $this->GetRealFilename($filename);
+ return file_exists($real_file);
+ }
+}
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.14.2/core/kernel/parser/template.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.14
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline