Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1034280
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
Sat, Jun 21, 1:36 PM
Size
94 KB
Mime Type
text/x-diff
Expires
Mon, Jun 23, 1:36 PM (1 h, 30 m)
Engine
blob
Format
Raw Data
Handle
668444
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.4.2/kernel/units/custom_fields/custom_fields_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/kernel/units/custom_fields/custom_fields_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/units/custom_fields/custom_fields_tag_processor.php (revision 6788)
@@ -0,0 +1,113 @@
+<?php
+
+ class CustomFieldsTagProcessor extends kDBTagProcessor {
+
+ /**
+ * Return LEFT JOINed custom field name from main item config
+ *
+ * @param Array $params
+ * @return string
+ */
+ function GetMainField($params)
+ {
+ $object =& $this->getObject($params);
+ $append = isset($params['append']) && $params['append'] ? $params['append'] : '';
+ return 'cust_'.$object->GetDBField('FieldName').$append;
+ }
+
+ function CustomField($params)
+ {
+ $params['name'] = $this->GetMainField($params);
+ $source_prefix = $this->Application->Parser->GetParam('SourcePrefix');
+ return $this->Application->ProcessParsedTag($source_prefix, 'Field', $params);
+ }
+
+ function CustomFormat($params)
+ {
+ $params['name'] = $this->GetMainField($params);
+ $source_prefix = $this->Application->Parser->GetParam('SourcePrefix');
+ return $this->Application->ProcessParsedTag($source_prefix, 'Format', $params);
+ }
+
+ function CustomInputName($params)
+ {
+ $params['name'] = $this->GetMainField($params);
+ $source_prefix = $this->Application->Parser->GetParam('SourcePrefix');
+ return $this->Application->ProcessParsedTag($source_prefix, 'InputName', $params);
+ }
+
+ function setParamValue(&$params, $param_name)
+ {
+ // $deep_level if GetParam = 1 used in case if PrintList is called during parsing "grid" block (=> +1 to deep_level)
+ if (!isset($params[$param_name])) {
+ $params[$param_name] = $this->Application->Parser->GetParam($param_name, 1);
+ }
+
+ return $params[$param_name];
+ }
+
+ /**
+ * Prints list content using block specified
+ *
+ * @param Array $params
+ * @return string
+ * @access public
+ */
+ function PrintList($params)
+ {
+ $this->setParamValue($params, 'SourcePrefix');
+ $this->setParamValue($params, 'value_field');
+
+ $list =& $this->GetList($params);
+ $id_field = $this->Application->getUnitOption($this->Prefix,'IDField');
+
+ $list->Query();
+ $o = '';
+ $list->GoFirst();
+
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $this->SelectParam($params, 'render_as,block');
+ $block_params['pass_params'] = 'true';
+
+ $prev_heading = '';
+ $display_original = false;
+ $source_prefix = getArrayValue($params, 'SourcePrefix');
+ if ($source_prefix) {
+ $source_object =& $this->Application->recallObject($source_prefix);
+ $display_original = $this->Application->ProcessParsedTag($source_prefix, 'DisplayOriginal', Array('display_original' => $this->setParamValue($params, 'display_original')));
+ }
+
+ if ($display_original) {
+ $block_params['display_original'] = $display_original;
+ $block_params['original_title'] = $this->setParamValue($params, 'original_title');
+ $original_object =& $this->Application->recallObject($source_prefix.'.original');
+ }
+
+ if ($this->Special == 'general') {
+ $this->groupRecords($list->Records, 'Heading');
+ }
+
+ while (!$list->EOL())
+ {
+ $this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET
+
+ if ($source_prefix) {
+ $list->SetDBField($params['value_field'], $source_object->GetDBField('cust_'.$list->GetDBField('FieldName')));
+ if ($display_original) {
+ $list->SetDBField('OriginalValue', $original_object->GetField('cust_'.$list->GetDBField('FieldName')));
+ }
+ $block_params['field'] = $block_params['virtual_field'] = 'cust_'.$list->GetDBField('FieldName');
+ $block_params['show_heading'] = ($prev_heading != $list->GetDBField('Heading') ) ? 1 : 0;
+ }
+
+ $o.= $this->Application->ParseBlock($block_params, 1);
+ $prev_heading = $list->GetDBField('Heading');
+ $list->GoNext();
+ }
+
+ $this->Application->SetVar( $this->getPrefixSpecial().'_id', '');
+ return $o;
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/kernel/units/custom_fields/custom_fields_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/kernel/units/images/image_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/kernel/units/images/image_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/units/images/image_tag_processor.php (revision 6788)
@@ -0,0 +1,207 @@
+<?php
+
+class ImageTagProcessor extends kDBTagProcessor {
+
+ function Image($params)
+ {
+ $params['img_path'] = $this->ImageSrc($params);
+ if ($params['img_path'] === false) return ;
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ $params['name'] = $this->SelectParam($params, 'block,render_as');
+
+ return $this->Application->ParseBlock($params);
+ }
+
+ function ItemImage($params)
+ {
+ $this->LoadItemImage($params);
+ $params['img_path'] = $this->ImageSrc($params);
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ if (isset($params['DefaultWidth'])) {
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ }
+ $params['name'] = $this->SelectParam($params, 'render_as,block');
+ $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ if ( !$object->isLoaded() && !$this->SelectParam($params, 'default_image,DefaultImage') ) return false;
+
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ return $this->Application->ParseBlock($params);
+ }
+
+ function LargeImageExists($params) {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ( $object->GetDBField('SameImages') == null || $object->GetDBField('SameImages')=='1' )
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ function LoadItemImage($params)
+ {
+ $parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null, Array('skip_autoload' => true));
+
+ // if we need primary thumbnail which is preloaded with products list
+ $object->Clear();
+
+ // if we need primary thumbnail which is preloaded with products list
+ if (
+ $this->SelectParam($params, 'thumbnail,Thumbnail') &&
+ (
+ (
+ $this->SelectParam($params, 'primary,Primary')
+ ||
+ !isset($params['name'])
+ )
+ &&
+ !$this->Application->GetVar('img_id')
+ &&
+ isset($parent_item->Fields['LocalThumb'])
+ )
+ )
+ {
+ $object->SetDefaultValues();
+ $object->SetDBFieldsFromHash($parent_item->GetFieldValues(), Array('SameImages', 'LocalThumb', 'ThumbPath', 'ThumbUrl', 'LocalImage', 'LocalPath', 'Url') );
+ $object->Loaded = true;
+ }
+ else { // if requested image is not primary thumbnail - load it directly
+ $id_field = $this->Application->getUnitOption($this->Prefix, 'ForeignKey');
+ $parent_table_key = $this->Application->getUnitOption($this->Prefix, 'ParentTableKey');
+
+ $keys[$id_field] = $parent_item->GetDBField($parent_table_key);
+
+ // which image to load?
+ if ( getArrayValue($params, 'Primary') ) { //load primary image
+ $keys['DefaultImg'] = 1;
+ }
+ elseif ( getArrayValue($params, 'name') ) { //load by name
+ $keys['Name'] = $params['name'];
+ }
+ elseif ( $image_id = $this->Application->GetVar($this->Prefix.'_id') ) {
+ $keys['ImageId'] = $image_id;
+ }
+ else {
+ $keys['DefaultImg'] = 1; //if primary was not set explicity and name was also not passed - load primary
+ }
+
+ $object->Load($keys);
+ }
+ }
+
+ function ImageSrc($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $ret = '';
+ // if we need thumb, or full image is same as thumb
+ if ( $this->SelectParam($params, 'thumbnail,Thumbnail') || $object->GetDBField('SameImages') )
+ {
+ // return local image or url
+ $ret = $object->GetDBField('LocalThumb') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('ThumbPath') : $object->GetDBField('ThumbUrl');
+ if ( $object->GetDBField('LocalThumb') && !file_exists(FULL_PATH.'/'.$object->GetDBField('ThumbPath')) ) $ret = '';
+ }
+ else { // if we need full which is not the same as thumb
+ $ret = $object->GetDBField('LocalImage') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('LocalPath') : $object->GetDBField('Url');
+ if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.'/'.$object->GetDBField('LocalPath')) ) $ret = '';
+ }
+
+ $default_image = $this->SelectParam($params, 'default_image,DefaultImage');
+ return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : ($default_image ? PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$default_image : false);
+ }
+
+ function GetFullPath($path)
+ {
+ if(!$path) return $path;
+
+ // absolute url
+ if( preg_match('/^(.*):\/\/(.*)$/U', $path) )
+ {
+ if(strpos($path, PROTOCOL.SERVER_NAME.BASE_PATH) === 0)
+ {
+ $path = str_replace(PROTOCOL.SERVER_NAME.BASE_PATH, FULL_PATH.'/', $path);
+ }
+ return $path;
+ }
+
+ // relative url
+ return FULL_PATH.'/'.substr(THEMES_PATH,1).'/'.$path;
+ }
+
+ /**
+ * Makes size clause for img tag, such as
+ * ' width="80" height="100"' according to max_width
+ * and max_heght limits.
+ *
+ * @param array $params
+ * @return string
+ */
+ function ImageSize($params)
+ {
+ $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') );
+
+ if (!file_exists($img_path)) return false;
+ $image_info = @getimagesize($img_path);
+
+// if( !($img_path && file_exists($img_path) && isset($image_info) ) )
+ if( !$image_info )
+ {
+ trigger_error('Image <b>'.$img_path.'</b> <span class="debug_error">missing or invalid</span>', E_USER_WARNING);
+ return false;
+ }
+
+ $orig_width = getArrayValue($image_info, 0);
+ $orig_height = getArrayValue($image_info, 1);
+ $max_width = getArrayValue($params, 'MaxWidth');
+ $max_height = getArrayValue($params, 'MaxHeight');
+
+ $too_large = is_numeric($max_width) ? ($orig_width > $max_width) : false;
+ $too_large = $too_large || (is_numeric($max_height) ? ($orig_height > $max_height) : false);
+
+ if($too_large)
+ {
+ $width_ratio = $max_width ? $max_width / $orig_width : 1;
+ $height_ratio = $max_height ? $max_height / $orig_height : 1;
+ $ratio = min($width_ratio, $height_ratio);
+
+ $width = ceil($orig_width * $ratio);
+ $height = ceil($orig_height * $ratio);
+ }
+ else
+ {
+ $width = $orig_width;
+ $height = $orig_height;
+ }
+
+ $size_clause = ' width="'.$width.'" height="'.$height.'"';
+ return $size_clause;
+ }
+
+
+ // used in admin
+ function ImageUrl($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ($object->GetDBField('SameImages') ? $object->GetDBField('LocalThumb') : $object->GetDBField('LocalImage') )
+ {
+ $ret = $this->Application->Phrase(getArrayValue($params,'local_phrase'));
+ }
+ else
+ {
+ $ret = $object->GetDBField('SameImages') ? $object->GetDBField('ThumbUrl') : $object->GetDBField('Url');
+ }
+ return $ret;
+ }
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/kernel/units/images/image_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/advanced_view.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/advanced_view.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/advanced_view.tpl (revision 6788)
@@ -0,0 +1,124 @@
+<inp2:m_RequireLogin permissions="in-portal:advanced_view.view" system="1" ajax="yes"/>
+<inp2:m_include t="incs/header" nobody="yes" noform="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="$Catalog.Init();">
+<inp2:m_ParseBlock name="section_header" prefix="c" icon="icon46_advanced_view" module="in-portal" title="!la_title_AdvancedView!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="c" title_preset="advanced_view" module="in-portal"/>
+
+<!-- main kernel_form: begin -->
+<inp2:m_RenderElement name="kernel_form"/>
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
+ <script type="text/javascript" src="<inp2:m_TemplatesBase module="in-portal"/>/incs/fw_menu.js"></script>
+ <script type="text/javascript" src="js/ajax.js"></script>
+ <script type="text/javascript" src="<inp2:m_TemplatesBase module="in-portal"/>/incs/catalog.js"></script>
+ <script type="text/javascript">
+ Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
+
+ Catalog.prototype.AfterInit = function() {
+ this.switchTab();
+ }
+
+ var $Catalog = new Catalog('<inp2:m_Link template="#TEMPLATE_NAME#" pass_through="ts,td" ts="showall" td="no" m_cat_id="#CATEGORY_ID#" no_amp="1"/>', 'advanced_view_', 0);
+ var a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ var $template = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'view_template');
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ std_delete_items($Catalog.ActivePrefix, $template, 1);
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassDecline');
+ }
+ ) );
+
+ 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()
+ {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ var $kf = document.getElementById($form_name);
+ var $prev_action = $kf.action;
+ $kf.action = '<inp2:m_t pass="all" no_pass_through="1"/>';
+
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
+ std_edit_item($Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'));
+
+ $kf.action = $prev_action;
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+<inp2:m_RenderElement name="kernel_form_end"/>
+<!-- main kernel_form: end -->
+
+<br />
+
+<!-- item tabs: begin -->
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <inp2:m_DefineElement name="item_tab" title="">
+ <td nowrap="nowrap" width="140">
+ <table id="<inp2:m_param name="prefix"/>.showall_tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('<inp2:m_param name="prefix"/>.showall');">
+ <tr>
+ <td class="catalog-tab-left">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td class="catalog-tab-middle" width="100%" valign="middle" nowrap="nowrap">
+ <inp2:m_phrase name="$title"/> <span class="cats_stats">(<span id="<inp2:m_param name="prefix"/>.showall_item_count">?</span>)</span>
+ </td>
+ <td class="catalog-tab-right">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td style="background-color: #FFFFFF;">
+ <img src="img/spacer.gif" height="1" width="5" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_DefineElement>
+ <inp2:adm_ListCatalogTabs render_as="item_tab" title_property="ViewMenuPhrase" replace_m="yes"/>
+ </tr>
+</table>
+<!-- item tabs: end -->
+<inp2:m_set ts="showall" td="no"/>
+<inp2:m_ModuleInclude template="catalog_tab" tab_init="2"/>
+
+<inp2:m_if check="m_get" var="SetTab">
+<script type="text/javascript">
+ $Catalog.switchTab('<inp2:m_get var="SetTab"/>.showall');
+</script>
+</inp2:m_if>
+
+<inp2:m_include t="incs/footer" noform="yes"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/advanced_view.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/summary/root.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/summary/root.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/summary/root.tpl (revision 6788)
@@ -0,0 +1,154 @@
+
+ <!-- overview box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+ <tr>
+ <td class="overviewbox_header">
+ <table cellpadding="0" cellspacing="0" width="100%">
+ <td valign="middle" align="left">
+ <img src="img/summary/overviewbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <span class="overview">Overview</span>
+ </td>
+ <td class="info" valign="middle" align="right">
+ <span class="overviewDate"><inp2:adm_TodayDate format="F j, Y"/></span>
+ </td>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="overviewbox_body" colspan="2">
+ <table cellspacing="0" cellpadding="0" width="100%">
+ <inp2:m_DefineElement name="stat_element">
+ <td class="<inp2:m_if check="m_ParamEquals" name="column_number" value="1">oInfo<inp2:m_else/>oValue</inp2:m_if>" align="center">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="70%" nowrap>
+ <inp2:Field name="ListLabel" as_label="1"/>:
+ </td>
+ <td width="30%" nowrap>
+ <inp2:CalculateValue field="ValueSQL"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_DefineElement>
+
+ <inp2:stat.summary_PrintList2 render_as="stat_element" columns="2"/>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ <!-- overview box: end -->
+
+ <!-- user search box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+ <tr>
+ <td class="searchbox_header">
+ <img src="img/summary/searchbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <inp2:m_phrase name="la_section_UsersSearch"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="searchbox_body">
+ <script type="text/javascript">
+ function doSearch()
+ {
+ submit_action('<inp2:m_t index_file="users/user_list.php" pass="m" escape="1"/>', 'm_user_search');
+ }
+ </script>
+
+ <img src="img/spacer.gif" width="12" height="13"><br />
+ <input name="list_search" class="search" type="text">
+ <img src="img/toolbar/icon16_search.gif" width="22" height="22" align="absMiddle" onclick="doSearch();">
+ </td>
+ </tr>
+ </table>
+ <!-- user search box: end -->
+
+ <!-- pending items box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+
+ <tr>
+ <td class="usersbox_header">
+ <img src="img/summary/usersbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <inp2:m_phrase name="la_prompt_PendingItems"/> <span class="info">(<inp2:stat_GetTotalPending/>)</span>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="usersbox_body">
+ <table width="100%" cellpadding="3" cellspacing="0">
+ <inp2:m_DefineElement name="stat_element">
+ <inp2:m_if check="m_ParamEquals" name="is_first" value="1">
+ <inp2:m_if check="m_ParamEquals" name="column_number" value="1">
+ <inp2:m_set cell_class="lTD"/>
+ <inp2:m_else/>
+ <inp2:m_set cell_class="rTD"/>
+ </inp2:m_if>
+ <inp2:m_else/>
+ <inp2:m_if check="m_ParamEquals" name="column_number" value="1">
+ <inp2:m_set cell_class="lTDi"/>
+ <inp2:m_else/>
+ <inp2:m_set cell_class="rTDi"/>
+ </inp2:m_if>
+ </inp2:m_if>
+
+ <td width="50%" class="<inp2:m_get name="cell_class"/>">
+ <img src="<inp2:$prefix_ModulePath/>img/itemicons/<inp2:m_param name="icon"/>" border="0" alt="" title="" />
+ <a href="<inp2:m_param name="url"/>" class="userslink"><inp2:m_phrase name="$label"/></a> <span class="info">(<inp2:CountPending prefix="$prefix"/>)</span>
+ </td>
+ </inp2:m_DefineElement>
+ <inp2:stat_PrintPendingStatistics render_as="stat_element" columns="2"/>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <!-- pending items box: end -->
+
+ <!-- quick links box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+ <tr>
+ <td class="overviewbox_header">
+ <img src="img/summary/overviewbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <inp2:m_phrase name="la_section_QuickLinks"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="overviewbox_body">
+ <table width="100%" cellspacing="0" cellpadding="4">
+ <tr>
+ <td>
+ <a class="userslink" href="<inp2:m_t t="in-portal/catalog" pass="m"/>">
+ <img hSpace="3" src="img/icons/icon24_navigate.gif" border="0" align="absMiddle">
+ <inp2:m_phrase name="la_Text_Catalog"/>
+ </a>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <a class="userslink" href="<inp2:m_t t="users/users_list" index_file="users/user_list.php" pass="m"/>">
+ <img hSpace="3" src="img/icons/icon24_users.gif" border="0" align="absMiddle">
+ <inp2:m_phrase name="la_Text_Users"/>
+ </a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <!-- quick links box: end -->
+
+
+
+
+
+
+
+
+
+
+
Property changes on: branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/summary/root.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/admin/install/restore_run.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/admin/install/restore_run.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/admin/install/restore_run.php (revision 6788)
@@ -0,0 +1,121 @@
+<?php
+
+function stats($caption,$myprogress,$totalnum)
+{
+ global $rootURL, $CancelURL, $admin;
+
+ if($totalnum>0)
+ {
+ $pct=round(($myprogress/ $totalnum)*100);
+ }
+ else
+ $pct = 100;
+
+ $o .=' <td>
+ <img src="images/icon_install.gif" width="46" height="46" alt="" align="absmiddle"> <span class="admintitle">'.$caption.'</span><br><br>
+ '.section_header('Step 2 - '.$caption.' - '.$pct.'%', true).'
+ <table border=0 cellpadding=0 cellspacing=0 width="100%" class="toolbar">
+ <tr>
+ <td><img src="images/toolbar/tool_cancel.gif" id="img_Cancel" width="32" height="32" border="0" alt="Next Category" onMouseOut="swap(\'img_Cancel\', \'toolbar/tool_cancel.gif\');" onMouseOver="swap(\'img_Cancel\',\'toolbar/tool_cancel_f2.gif\');" onClick="history.go(-1);"></td>
+ <!--<td><img src="images/toolbar/tool_divider.gif" width="4" height="32" border="0"><br></td>-->
+ <td width="100%"> </td>
+ </tr>
+ </table>
+ <!-- toolbar button \\-->
+
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
+ <tr valign="top">
+ <td width="60%" bgcolor="#F0F0F0"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="4">';
+
+ echo "\n";
+
+ $o .= " <tr class=\"table_color2\">
+ <td ALIGN=\"center\"><br>
+<TABLE CLASS=\"tableborder_full\" width=\"75%\">
+ <TR border=1><TD bgcolor=\"#507F15\" width=\"".$pct."%\"> </TD>";
+ $comp_pct = 100-$pct;
+ $o .= " <TD bgcolor=#FFFFFF width=\"".$comp_pct."%\"></TD></TR>";
+ $o .= " </TABLE><BR /><input type=button VALUE=\"Cancel\" CLASS=\"button\" ONCLICK=\"document.location='".$CancelURL."';\">
+ </td>
+ </tr></table></td>";
+
+ //$o .= "<!--<tr><td class=\"tabletitle\" STYLE=\"border: 1px solid #000000;\" bgcolor=\"#333333\">".$caption."-".$pct."%</td></tr>-->";
+ //$o .= "<TR><TD align=\"middle\" bgcolor=\"#F0F0F0\"><br />";
+ //$o .= " <TABLE CLASS=\"tableborder_full\" width=\"75%\">";
+ //$o .=" <TR border=1><TD bgcolor=\"#507F15\" width=\"".$pct."%\"> </TD>";
+ //$comp_pct = 100-$pct;
+ //$o .= " <TD bgcolor=#FFFFFF width=\"".$comp_pct."%\"></TD></TR>";
+ //$o .= " </TABLE>";
+ //$o .= " <BR /><input type=button VALUE=\"Cancel\" CLASS=\"button\" ONCLICK=\"document.location='".$CancelURL."';\">";
+ echo $o."\n";
+ //echo "</TD></TR></TABLE></td>";
+}
+
+function reload($url)
+{
+ print "<script language=\"javascript\">" ;
+ print "setTimeout(\"document.location='$url';\",40);";
+ print " </script>";
+ //echo "<A HREF=\"$url\">Next </A>";
+}
+
+$TotalSize = filesize($backupfile);
+
+$MaxLines = 200;
+
+$PageTitle = "Restore In Progress";
+$CancelURL = $rootURL ."admin/install.php";
+
+stats($PageTitle,$FileOffset,$TotalSize);
+
+if($FileOffset < $TotalSize)
+{
+ $FileOffset = RunRestoreFile($ado,$backupfile,$FileOffset,$MaxLines);
+ if($FileOffset>-1)
+ {
+ if ($_POST['next_step']) {
+ $next_step = $_POST['next_step'];
+ }
+ else if ($_GET['next_step']) {
+ $next_step = $_GET['next_step'];
+ }
+ //$next_step--;
+ if($FileOffset ==0)
+ $FileOffset = $TotalSize;
+ $backupfile = SuperStrip($backupfile);
+ $url = $_SERVER['PHP_SELF']."?Offset=$FileOffset&File=$backupfile&state=restore_run&next_step=$next_step&install_type=$install_type&show_prev=1";
+ }
+ else
+ {
+ switch($FileOffset)
+ {
+ case -1:
+ $error = prompt_language("la_restore_file_error");
+ break;
+ case -2:
+ $error = prompt_language("la_restore_read_error");
+ break;
+ default:
+ $error = "(".$FileOffset.") ".prompt_language("la_restore_unknown_error");
+ break;
+ }
+ $application =& kApplication::Instance();
+ $application->ApplicationDie($error);
+ }
+}
+else {
+ if ($_POST['next_step']) {
+ $next_step = $_POST['next_step'];
+ }
+ else if ($_GET['next_step']) {
+ $next_step = $_GET['next_step'];
+ }
+
+ $url = $_SERVER['PHP_SELF']."?state=finish&next_step=$next_step&install_type=$install_type";
+}
+
+reload($url);
+
+?>
+<!--<br>
+<p class="error"><?php echo $restore_error; ?></p> -->
Property changes on: branches/unlabeled/unlabeled-1.4.2/admin/install/restore_run.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/units/images/image_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/units/images/image_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/images/image_tag_processor.php (revision 6788)
@@ -0,0 +1,207 @@
+<?php
+
+class ImageTagProcessor extends kDBTagProcessor {
+
+ function Image($params)
+ {
+ $params['img_path'] = $this->ImageSrc($params);
+ if ($params['img_path'] === false) return ;
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ $params['name'] = $this->SelectParam($params, 'block,render_as');
+
+ return $this->Application->ParseBlock($params);
+ }
+
+ function ItemImage($params)
+ {
+ $this->LoadItemImage($params);
+ $params['img_path'] = $this->ImageSrc($params);
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ if (isset($params['DefaultWidth'])) {
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ }
+ $params['name'] = $this->SelectParam($params, 'render_as,block');
+ $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ if ( !$object->isLoaded() && !$this->SelectParam($params, 'default_image,DefaultImage') ) return false;
+
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ return $this->Application->ParseBlock($params);
+ }
+
+ function LargeImageExists($params) {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ( $object->GetDBField('SameImages') == null || $object->GetDBField('SameImages')=='1' )
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ function LoadItemImage($params)
+ {
+ $parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null, Array('skip_autoload' => true));
+
+ // if we need primary thumbnail which is preloaded with products list
+ $object->Clear();
+
+ // if we need primary thumbnail which is preloaded with products list
+ if (
+ $this->SelectParam($params, 'thumbnail,Thumbnail') &&
+ (
+ (
+ $this->SelectParam($params, 'primary,Primary')
+ ||
+ !isset($params['name'])
+ )
+ &&
+ !$this->Application->GetVar('img_id')
+ &&
+ isset($parent_item->Fields['LocalThumb'])
+ )
+ )
+ {
+ $object->SetDefaultValues();
+ $object->SetDBFieldsFromHash($parent_item->GetFieldValues(), Array('SameImages', 'LocalThumb', 'ThumbPath', 'ThumbUrl', 'LocalImage', 'LocalPath', 'Url') );
+ $object->Loaded = true;
+ }
+ else { // if requested image is not primary thumbnail - load it directly
+ $id_field = $this->Application->getUnitOption($this->Prefix, 'ForeignKey');
+ $parent_table_key = $this->Application->getUnitOption($this->Prefix, 'ParentTableKey');
+
+ $keys[$id_field] = $parent_item->GetDBField($parent_table_key);
+
+ // which image to load?
+ if ( getArrayValue($params, 'Primary') ) { //load primary image
+ $keys['DefaultImg'] = 1;
+ }
+ elseif ( getArrayValue($params, 'name') ) { //load by name
+ $keys['Name'] = $params['name'];
+ }
+ elseif ( $image_id = $this->Application->GetVar($this->Prefix.'_id') ) {
+ $keys['ImageId'] = $image_id;
+ }
+ else {
+ $keys['DefaultImg'] = 1; //if primary was not set explicity and name was also not passed - load primary
+ }
+
+ $object->Load($keys);
+ }
+ }
+
+ function ImageSrc($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $ret = '';
+ // if we need thumb, or full image is same as thumb
+ if ( $this->SelectParam($params, 'thumbnail,Thumbnail') || $object->GetDBField('SameImages') )
+ {
+ // return local image or url
+ $ret = $object->GetDBField('LocalThumb') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('ThumbPath') : $object->GetDBField('ThumbUrl');
+ if ( $object->GetDBField('LocalThumb') && !file_exists(FULL_PATH.'/'.$object->GetDBField('ThumbPath')) ) $ret = '';
+ }
+ else { // if we need full which is not the same as thumb
+ $ret = $object->GetDBField('LocalImage') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('LocalPath') : $object->GetDBField('Url');
+ if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.'/'.$object->GetDBField('LocalPath')) ) $ret = '';
+ }
+
+ $default_image = $this->SelectParam($params, 'default_image,DefaultImage');
+ return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : ($default_image ? PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$default_image : false);
+ }
+
+ function GetFullPath($path)
+ {
+ if(!$path) return $path;
+
+ // absolute url
+ if( preg_match('/^(.*):\/\/(.*)$/U', $path) )
+ {
+ if(strpos($path, PROTOCOL.SERVER_NAME.BASE_PATH) === 0)
+ {
+ $path = str_replace(PROTOCOL.SERVER_NAME.BASE_PATH, FULL_PATH.'/', $path);
+ }
+ return $path;
+ }
+
+ // relative url
+ return FULL_PATH.'/'.substr(THEMES_PATH,1).'/'.$path;
+ }
+
+ /**
+ * Makes size clause for img tag, such as
+ * ' width="80" height="100"' according to max_width
+ * and max_heght limits.
+ *
+ * @param array $params
+ * @return string
+ */
+ function ImageSize($params)
+ {
+ $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') );
+
+ if (!file_exists($img_path)) return false;
+ $image_info = @getimagesize($img_path);
+
+// if( !($img_path && file_exists($img_path) && isset($image_info) ) )
+ if( !$image_info )
+ {
+ trigger_error('Image <b>'.$img_path.'</b> <span class="debug_error">missing or invalid</span>', E_USER_WARNING);
+ return false;
+ }
+
+ $orig_width = getArrayValue($image_info, 0);
+ $orig_height = getArrayValue($image_info, 1);
+ $max_width = getArrayValue($params, 'MaxWidth');
+ $max_height = getArrayValue($params, 'MaxHeight');
+
+ $too_large = is_numeric($max_width) ? ($orig_width > $max_width) : false;
+ $too_large = $too_large || (is_numeric($max_height) ? ($orig_height > $max_height) : false);
+
+ if($too_large)
+ {
+ $width_ratio = $max_width ? $max_width / $orig_width : 1;
+ $height_ratio = $max_height ? $max_height / $orig_height : 1;
+ $ratio = min($width_ratio, $height_ratio);
+
+ $width = ceil($orig_width * $ratio);
+ $height = ceil($orig_height * $ratio);
+ }
+ else
+ {
+ $width = $orig_width;
+ $height = $orig_height;
+ }
+
+ $size_clause = ' width="'.$width.'" height="'.$height.'"';
+ return $size_clause;
+ }
+
+
+ // used in admin
+ function ImageUrl($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ($object->GetDBField('SameImages') ? $object->GetDBField('LocalThumb') : $object->GetDBField('LocalImage') )
+ {
+ $ret = $this->Application->Phrase(getArrayValue($params,'local_phrase'));
+ }
+ else
+ {
+ $ret = $object->GetDBField('SameImages') ? $object->GetDBField('ThumbUrl') : $object->GetDBField('Url');
+ }
+ return $ret;
+ }
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/units/images/image_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/units/admin/admin_events_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/units/admin/admin_events_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/admin/admin_events_handler.php (revision 6788)
@@ -0,0 +1,35 @@
+<?php
+
+class AdminEventsHandler extends kDBEventHandler {
+
+ function OnResetModRwCache(&$event)
+ {
+ $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName LIKE "mod_rw%"');
+ }
+
+ function OnResetCMSMenuCache(&$event)
+ {
+ $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = "cms_menu"');
+ }
+
+ function OnResetSections(&$event)
+ {
+ $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"');
+ }
+
+ function OnResetConfigsCache(&$event)
+ {
+ $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = "config_files" OR VarName = "configs_parsed"');
+ }
+
+ /**
+ * Occurs right after initialization of the kernel, used mainly as hook-to event
+ *
+ * @param kEvent $event
+ */
+ function OnStartup(&$event)
+ {
+
+ }
+
+}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/units/admin/admin_events_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/search_helper.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/search_helper.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/search_helper.php (revision 6788)
@@ -0,0 +1,467 @@
+<?php
+
+ class kSearchHelper extends kHelper {
+
+
+ /**
+ * Splits search phrase into keyword using quotes,plus and minus sings and spaces as split criteria
+ *
+ * @param string $keyword
+ * @return string
+ */
+ function splitKeyword($keyword)
+ {
+ $quotes_re = '/([+\-]?)"(.*?)"/';
+ $no_quotes_re = '/([+\-]?)([^ ]+)/';
+
+ $quoted_kw = preg_match_all($quotes_re, $keyword, $res);
+ foreach ($res[2] as $index => $kw) $final[$kw] = $res[1][$index];
+ $keyword = preg_replace($quotes_re, '', $keyword);
+ $not_quoted_kw = preg_match_all($no_quotes_re, $keyword, $res);
+ foreach ($res[2] as $index => $kw) $final[$kw] = $res[1][$index];
+
+ return $final;
+ }
+
+ function getPositiveKeywords($keyword)
+ {
+ $keywords = $this->splitKeyword($keyword);
+
+ $ret = Array();
+ foreach ($keywords as $keyword => $sign) {
+ if ($sign == '+' || $sign == '') {
+ $ret[] = $keyword;
+ }
+ }
+ return $ret;
+ }
+
+ function buildWhereClause($keyword, $fields)
+ {
+ $keywords = $this->splitKeyword($keyword);
+
+ $normal_conditions = Array();
+ $plus_conditions = Array();
+ $minus_conditions = Array();
+
+ foreach ($keywords as $keyword => $sign) {
+ switch ($sign) {
+ case '+':
+ $plus_conditions[] = implode(' LIKE "%'.$keyword.'%" OR ', $fields).' LIKE "%'.$keyword.'%"';
+ break;
+
+ case '-':
+ foreach ($fields as $field) {
+ $condition[] = $field.' NOT LIKE "%'.$keyword.'%" OR '.$field.' IS NULL';
+ }
+ $minus_conditions[] = '('.implode(') AND (', $condition).')';
+ break;
+
+ case '':
+ $normal_conditions[] = implode(' LIKE "%'.$keyword.'%" OR ', $fields).' LIKE "%'.$keyword.'%"';
+ break;
+ }
+ }
+
+ // building where clause
+ if ($normal_conditions) {
+ $where_clause = '('.implode(') OR (', $normal_conditions).')';
+ }
+ else {
+ $where_clause = '1';
+ }
+
+ if ($plus_conditions) {
+ $where_clause = '('.$where_clause.') AND ('.implode(') AND (', $plus_conditions).')';
+ }
+
+ if ($minus_conditions) {
+ $where_clause = '('.$where_clause.') AND ('.implode(') AND (', $minus_conditions).')';
+ }
+
+ return $where_clause;
+ }
+
+ /**
+ * Returns additional information about search field
+ *
+ * @param kDBList $object
+ * @param string $field_name
+ * @return Array
+ */
+ function getFieldInformation(&$object, $field_name)
+ {
+ $sql_filter_type = isset($object->VirtualFields[$field_name]) ? 'having' : 'where';
+ $field_type = isset($object->Fields[$field_name]['type']) ? $object->Fields[$field_name]['type'] : 'string';
+
+ if (preg_match('/(.*)\.(.*)/', $field_name, $regs)) {
+ $table_name = '`'.$regs[1].'`.'; // field from external table
+ $field_name = $regs[2];
+ }
+ elseif ($sql_filter_type == 'where') {
+ $table_name = '`'.$object->TableName.'`.'; // field from local table
+ }
+
+ $table_name = ($sql_filter_type == 'where') ? $table_name : '';
+ return Array ('field_name' => $field_name, 'field_type' => $field_type, 'table_name' => $table_name, 'sql_filter_type' => $sql_filter_type);
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param kEvent $event
+ */
+ function performSearch(&$event)
+ {
+ $object =& $event->getObject();
+
+ // process search keyword
+ $search_keyword = $this->Application->GetVar( $event->getPrefixSpecial(true).'_search_keyword');
+ $this->Application->StoreVar( $event->getPrefixSpecial().'_search_keyword', $search_keyword);
+ $search_keyword = str_replace('*', '%', $search_keyword);
+
+ $custom_filter = $this->processCustomFilters($event);
+
+ if(!$search_keyword && $custom_filter === false) {
+ $this->resetSearch($event);
+ return true;
+ }
+
+ if ($search_keyword) {
+ $this->processAutomaticFilters($event, $search_keyword, $custom_filter);
+ }
+ }
+
+
+ function processAutomaticFilters(&$event, $search_keyword, $custom_filter)
+ {
+ $grid_name = $this->Application->GetVar('grid_name');
+ $grids = $this->Application->getUnitOption($event->Prefix, 'Grids');
+ $search_fields = array_keys($grids[$grid_name]['Fields']);
+
+ $search_filter = Array();
+ $object =& $event->getObject();
+
+ foreach ($search_fields as $search_field) {
+ $custom_search = isset($custom_filter[$search_field]);
+
+ $filter_data = $this->getSearchClause($object, $search_field, $search_keyword, $custom_search);
+
+ if ($filter_data) {
+ $search_filter[$search_field] = $filter_data;
+ }
+ }
+ $this->Application->StoreVar($event->getPrefixSpecial().'_search_filter', serialize($search_filter) );
+ }
+
+ /**
+ * Returns search clause for any particular field
+ *
+ * @param kDBList $object
+ * @param string $search_field
+ * @param string $search_keyword what we are searching (false, when building custom filter clause)
+ * @param string $custom_search already found using custom filter
+ * @return Array
+ */
+ function getSearchClause(&$object, $field_name, $search_keyword, $custom_search)
+ {
+ $search_keywords = $this->splitKeyword($search_keyword);
+
+ extract( $this->getFieldInformation($object, $field_name) ); // see getFieldInformation for more details
+
+ $filter_value = '';
+
+ // get field clause by formatter name and/or parameters
+ $formatter = getArrayValue($object->Fields[$field_name], 'formatter');
+ switch ($formatter) {
+ case 'kOptionsFormatter':
+ $search_keys = Array();
+
+ if ($custom_search === false) {
+ // if keywords passed through simple search filter (on each grid)
+ $use_phrases = getArrayValue($object->Fields[$field_name], 'use_phrases');
+ $field_options = $object->GetFieldOptions($field_name);
+ foreach ($field_options['options'] as $key => $val) {
+ foreach ($search_keywords as $keyword => $sign) {
+ $pattern = '#'.$keyword.'#i';
+ if (!preg_match($pattern, $use_phrases ? $this->Application->Phrase($val) : $val)) {
+ if ($sign == '+') {
+ $filter_value = $table_name.'`'.$field_name.'` = NULL';
+ break;
+ }
+ else {
+ continue;
+ }
+ }
+
+ if ($sign == '+' || $sign == '') {
+ $search_keys[$key] = $this->Conn->qstr($key);
+ }
+ elseif($sign == '-') {
+ // if same value if found as exclusive too, then remove from search result
+ unset($search_keys[$key]);
+ }
+ }
+ }
+ }
+
+ if ($search_keys) {
+ $filter_value = $table_name.'`'.$field_name.'` IN ('.implode(',', $search_keys).')';
+ }
+
+ $field_processed = true;
+ break;
+
+ case 'kDateFormatter':
+ $field_processed = true;
+ break;
+
+ /*case 'kDateFormatter': // move to Custom Filters (by Alex)
+ $filter_value = Array();
+ if ($field_name === false) {
+ $field_value = getArrayValue($custom_filter, $field_name.'_datefrom', 'submit_value');
+ if ($field_value) {
+ $value = $this->processRangeField($event, $field_name, 'datefrom', $field_value, $formatter);
+ $filter_value[] = $table_name.'`'.$field_name.'` >= '.$value;
+ }
+
+ $field_value = getArrayValue($custom_filter, $field_name.'_dateto', 'submit_value');
+ if ($field_value) {
+ $value = $this->processRangeField($event, $field_name, 'dateto', $field_value, $formatter);
+ $filter_value[] = $table_name.'`'.$field_name.'` <= '.$value;
+ }
+
+ $filter_value = $filter_value ? '('.implode(') AND (', $filter_value).')' : '';
+ }
+
+ $field_processed = true;
+ break;*/
+
+ default:
+ $field_processed = false;
+ break;
+ }
+
+ // if not already processed by formatter, then get clause by field type
+ if (!$field_processed && $search_keywords) {
+ switch($field_type)
+ {
+ case 'int':
+ case 'integer':
+ case 'numeric':
+ $search_keys = Array();
+ foreach ($search_keywords as $keyword => $sign) {
+ if (!is_numeric($keyword) || ($sign == '-')) continue;
+ $search_keys[] = $this->Conn->qstr($keyword);
+ }
+
+ if ($search_keys) {
+ $filter_value = $table_name.'`'.$field_name.'` IN ('.implode(',', $search_keys).')';
+ }
+ break;
+
+ case 'double':
+ case 'float':
+ case 'real':
+ $search_keys = Array();
+ foreach ($search_keywords as $keyword => $sign) {
+ $keyword = str_replace(',', '.', $keyword);
+ if (!is_numeric($keyword) || ($sign == '-')) continue;
+ $search_keys[] = 'ABS('.$table_name.'`'.$field_name.'` - '.$this->Conn->qstr($keyword).') <= 0.0001';
+ }
+
+ if ($search_keys) {
+ $filter_value = '('.implode(') OR (', $search_keys).')';
+ }
+ break;
+
+ case 'string':
+ $filter_value = $this->buildWhereClause($search_keyword, Array($table_name.'`'.$field_name.'`'));
+ break;
+ }
+ }
+
+ if ($filter_value) {
+ return Array('type' => $sql_filter_type, 'value' => $filter_value);
+ }
+
+ return false;
+ }
+
+ /**
+ * Processes custom filters from submit
+ *
+ * @param KEvent $event
+ * @return bool
+ */
+ function processCustomFilters(&$event)
+ {
+ $grid_name = $this->Application->GetVar('grid_name');
+
+ // update "custom filter" with values from submit: begin
+ $custom_filters = $this->Application->RecallVar($event->getPrefixSpecial().'_custom_filter');
+ if ($custom_filters) {
+ $custom_filters = unserialize($custom_filters);
+ $custom_filter = isset($custom_filters[$grid_name]) ? $custom_filters[$grid_name] : Array ();
+ }
+ else {
+ $custom_filter = Array ();
+ }
+
+ // submit format custom_filters[prefix_special][field]
+ $submit_filters = $this->Application->GetVar('custom_filters');
+ if ($submit_filters) {
+ $submit_filters = getArrayValue($submit_filters, $event->getPrefixSpecial(), $grid_name);
+ if ($submit_filters) {
+ foreach ($submit_filters as $field_name => $field_options) {
+ list ($filter_type, $field_value) = each($field_options);
+ $is_empty = is_array($field_value) ? !implode('', $field_value) : !$field_value;
+ if ($is_empty) {
+ if (isset($custom_filter[$field_name])) {
+ // use isset, because non-existing key will cause "php notice"!
+ unset($custom_filter[$field_name][$filter_type]); // remove filter
+
+ if (!$custom_filter[$field_name]) {
+ // if no filters left for field, then delete record at all
+ unset($custom_filter[$field_name]);
+ }
+ }
+ }
+ else {
+ $custom_filter[$field_name][$filter_type]['submit_value'] = $field_value;
+ }
+ }
+ }
+ }
+
+ if ($custom_filter) {
+ $custom_filters[$grid_name] = $custom_filter;
+ }
+ else {
+ unset($custom_filters[$grid_name]);
+ }
+ // update "custom filter" with values from submit: end
+
+ if (!$custom_filter) {
+ // in case when no filters specified, there are nothing to process
+ $this->Application->StoreVar($event->getPrefixSpecial().'_custom_filter', serialize($custom_filters) );
+ return false;
+ }
+
+ $object =& $event->getObject(); // don't recall it each time in getCustomFilterSearchClause
+ foreach ($custom_filter as $field_name => $field_options) {
+ list ($filter_type, $field_options) = each($field_options);
+ $field_options = $this->getCustomFilterSearchClause($object, $field_name, $filter_type, $field_options);
+ if ($field_options['value']) {
+ $custom_filter[$field_name][$filter_type] = $field_options;
+ }
+ }
+
+ $custom_filters[$grid_name] = $custom_filter;
+ $this->Application->StoreVar($event->getPrefixSpecial().'_custom_filter', serialize($custom_filters) );
+ return $custom_filter;
+ }
+
+ function getCustomFilterSearchClause(&$object, $field_name, $filter_type, $field_options)
+ {
+ extract( $this->getFieldInformation($object, $field_name) ); // see getFieldInformation for more details
+
+ $filter_value = '';
+
+ switch ($filter_type) {
+ case 'range':
+ $from = $field_options['submit_value']['from'] ? $this->Conn->qstr($field_options['submit_value']['from']) : false;
+ $to = $field_options['submit_value']['to'] ? $this->Conn->qstr($field_options['submit_value']['to']) : false;
+
+ if ($from !== false && $to !== false) {
+ // add range filter
+ $filter_value = $table_name.'`'.$field_name.'` >= '.$from.' AND '.$table_name.'`'.$field_name.'` <= '.$to;
+ }
+ elseif ($from !== false && $to === false) {
+ // add equals filter on $from
+ $filter_value = $table_name.'`'.$field_name.'` = '.$from;
+ }
+ elseif ($from === false && $to !== false) {
+ // add equals filter on $to
+ $filter_value = $table_name.'`'.$field_name.'` = '.$to;
+ }
+ break;
+
+ case 'date_range':
+ break;
+
+ case 'equals':
+ case 'options':
+ $field_value = $field_options['submit_value'] ? $this->Conn->qstr($field_options['submit_value']) : false;
+ if ($field_value) {
+ $filter_value = $table_name.'`'.$field_name.'` = '.$field_value;
+ }
+ break;
+
+ case 'like':
+ $filter_value = $this->buildWhereClause($field_options['submit_value'], Array($table_name.'`'.$field_name.'`'));
+ break;
+
+ default:
+ break;
+ }
+
+ $field_options['sql_filter_type'] = $sql_filter_type;
+ $field_options['value'] = $filter_value;
+
+ return $field_options;
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param kEvent $event
+ * @param string $search_field
+ * @param string $type
+ * @param string $value
+ * @param string $formatter_class
+ */
+ function processRangeField(&$event, $search_field, $type, $value, $formatter_class)
+ {
+ $field = $search_field.'_'.$type;
+ $lang_current =& $this->Application->recallObject('lang.current');
+
+ $object =& $event->getObject();
+ $dt_separator = getArrayValue( $object->GetFieldOptions($search_field), 'date_time_separator' );
+ if(!$dt_separator) $dt_separator = ' ';
+
+ $time = ($type == 'datefrom') ? adodb_mktime(0,0,0) : adodb_mktime(23,59,59);
+ $time = adodb_date( $lang_current->GetDBField('InputTimeFormat'), $time);
+ $full_value = $value.$dt_separator.$time;
+
+ $formatter =& $this->Application->recallObject($formatter_class);
+
+ $value_ts = $formatter->Parse($full_value, $search_field, $object);
+ $pseudo = getArrayValue($object->FieldErrors, $search_field, 'pseudo');
+ if($pseudo)
+ {
+ $this->Application->StoreVar($event->getPrefixSpecial().'_'.$field.'_error', $pseudo);
+ return -1;
+ }
+ return $value_ts;
+ }
+
+ /**
+ * Resets current search
+ *
+ * @param kEvent $event
+ */
+ function resetSearch(&$event)
+ {
+ $this->Application->RemoveVar($event->getPrefixSpecial().'_search_filter');
+ $this->Application->RemoveVar($event->getPrefixSpecial().'_search_keyword');
+
+ $this->Application->RemoveVar($event->getPrefixSpecial().'_custom_filter');
+ }
+
+
+
+
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/units/general/helpers/search_helper.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/catalog/advanced_view.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/admin_templates/catalog/advanced_view.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/admin_templates/catalog/advanced_view.tpl (revision 6788)
@@ -0,0 +1,124 @@
+<inp2:m_RequireLogin permissions="in-portal:advanced_view.view" system="1" ajax="yes"/>
+<inp2:m_include t="incs/header" nobody="yes" noform="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="$Catalog.Init();">
+<inp2:m_ParseBlock name="section_header" prefix="c" icon="icon46_advanced_view" module="in-portal" title="!la_title_AdvancedView!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="c" title_preset="advanced_view" module="in-portal"/>
+
+<!-- main kernel_form: begin -->
+<inp2:m_RenderElement name="kernel_form"/>
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
+ <script type="text/javascript" src="<inp2:m_TemplatesBase module="in-portal"/>/incs/fw_menu.js"></script>
+ <script type="text/javascript" src="js/ajax.js"></script>
+ <script type="text/javascript" src="<inp2:m_TemplatesBase module="in-portal"/>/incs/catalog.js"></script>
+ <script type="text/javascript">
+ Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
+
+ Catalog.prototype.AfterInit = function() {
+ this.switchTab();
+ }
+
+ var $Catalog = new Catalog('<inp2:m_Link template="#TEMPLATE_NAME#" pass_through="ts,td" ts="showall" td="no" m_cat_id="#CATEGORY_ID#" no_amp="1"/>', 'advanced_view_', 0);
+ var a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ var $template = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'view_template');
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ std_delete_items($Catalog.ActivePrefix, $template, 1);
+ } ) );
+
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.showall]', 1);
+ $Catalog.submit_event($Catalog.ActivePrefix, 'OnMassDecline');
+ }
+ ) );
+
+ 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()
+ {
+ $form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+ var $kf = document.getElementById($form_name);
+ var $prev_action = $kf.action;
+ $kf.action = '<inp2:m_t pass="all" no_pass_through="1"/>';
+
+ set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
+ std_edit_item($Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'));
+
+ $kf.action = $prev_action;
+ }
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+<inp2:m_RenderElement name="kernel_form_end"/>
+<!-- main kernel_form: end -->
+
+<br />
+
+<!-- item tabs: begin -->
+<table cellpadding="0" cellspacing="0">
+ <tr>
+ <inp2:m_DefineElement name="item_tab" title="">
+ <td nowrap="nowrap" width="140">
+ <table id="<inp2:m_param name="prefix"/>.showall_tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('<inp2:m_param name="prefix"/>.showall');">
+ <tr>
+ <td class="catalog-tab-left">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td class="catalog-tab-middle" width="100%" valign="middle" nowrap="nowrap">
+ <inp2:m_phrase name="$title"/> <span class="cats_stats">(<span id="<inp2:m_param name="prefix"/>.showall_item_count">?</span>)</span>
+ </td>
+ <td class="catalog-tab-right">
+ <img src="img/spacer.gif" height="22" width="9" />
+ </td>
+ <td style="background-color: #FFFFFF;">
+ <img src="img/spacer.gif" height="1" width="5" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_DefineElement>
+ <inp2:adm_ListCatalogTabs render_as="item_tab" title_property="ViewMenuPhrase" replace_m="yes"/>
+ </tr>
+</table>
+<!-- item tabs: end -->
+<inp2:m_set ts="showall" td="no"/>
+<inp2:m_ModuleInclude template="catalog_tab" tab_init="2"/>
+
+<inp2:m_if check="m_get" var="SetTab">
+<script type="text/javascript">
+ $Catalog.switchTab('<inp2:m_get var="SetTab"/>.showall');
+</script>
+</inp2:m_if>
+
+<inp2:m_include t="incs/footer" noform="yes"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/catalog/advanced_view.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/form_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/form_blocks.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/form_blocks.tpl (revision 6788)
@@ -0,0 +1,434 @@
+<inp2:m_block name="section_header"/>
+ <inp2:m_if check="m_ParamEquals" name="prefix" value="" inverse="inverse">
+ <inp2:m_RenderElement name="section_header_new" pass_params="true"/>
+ <inp2:m_else />
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
+ <tr class="section_header_bg">
+ <td valign="top" class="admintitle" align="left" style="padding-top: 2px; padding-bottom: 2px;">
+ <img width="46" height="46" src="img/icons/<inp2:adm_GetSectionIcon icon="$icon"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$title"/>"> <inp2:adm_GetSectionTitle phrase="$title"/>
+ </td>
+ </tr>
+ </table>
+ </inp2:m_if>
+<inp2:m_blockend/>
+
+<inp2:m_DefineElement name="section_header_new" module="#session#">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
+ <tr style="background: url(<inp2:ModulePath module="$module"/>img/logo_bg.gif) no-repeat top right;">
+ <td valign="top" class="admintitle" align="left" style="padding-top: 2px; padding-bottom: 2px;">
+ <img width="46" height="46" src="<inp2:ModulePath module="$module"/>img/icons/<inp2:adm_GetSectionIcon icon="$icon"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$title"/>"> <inp2:adm_GetSectionTitle phrase="$title"/>
+ </td>
+ </tr>
+ </table>
+</inp2:m_DefineElement>
+
+<inp2:m_block name="blue_bar" module="" icon=""/>
+ <table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">
+ <tr>
+ <td class="header_left_bg" nowrap width="80%" valign="middle">
+ <span class="tablenav_link" id="blue_bar"><inp2:$prefix_SectionTitle title_preset="$title_preset" title="Invalid OR Missing title preset [#preset_name#]" cut_first="100"/></span>
+ </td>
+ <td align="right" class="tablenav" width="20%" valign="middle">
+ <inp2:m_if check="m_ModuleEnabled" module="In-Portal">
+ <script>
+ var $help_url='<inp2:m_t t="help" h_prefix="$prefix" h_icon="$icon" h_module="$module" h_title_preset="$title_preset" pass="all,m,h" m_opener="p" escape="escape"/>';
+ $help_url = $help_url.replace(/#/g, '%23');
+ set_window_title( RemoveTranslationLink(document.getElementById('blue_bar').innerHTML, false).replace(/(<[^<]+>)/g, '') );
+ </script>
+ <a href="javascript: OpenHelp($help_url);">
+ <img src="img/blue_bar_help.gif" border="0">
+ </a>
+ </inp2:m_if>
+ </td>
+ </tr>
+ </table>
+<inp2:m_blockend/>
+
+<inp2:m_DefineElement name="inp_original_label">
+ <td><inp2:$prefix.original_Field field="$field"/></td>
+</inp2:m_DefineElement>
+
+<inp2:m_block name="subsection" prefix=""/>
+ <tr class="subsectiontitle">
+ <td colspan="3"><inp2:m_phrase label="$title"/></td>
+ <inp2:m_if check="m_ParamEquals" name="prefix" value="" inverse="inverse">
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <td><inp2:m_phrase name="$original_title"/></td>
+ </inp2:m_if>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_field_caption" subfield="" NamePrefix=""/>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="text">
+ <label for="<inp2:m_param name="NamePrefix"/><inp2:$prefix_InputName field="$field" subfield="$subfield"/>">
+ <span class="<inp2:m_if prefix="$prefix" function="HasError" field="$field"/>error<inp2:m_endif/>">
+ <inp2:m_phrase label="$title"/></span><inp2:m_if prefix="$prefix" function="IsRequired" field="$field"/><span class="error"> *</span><inp2:m_endif/>:
+ </label>
+ </td>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_label" is_last="" as_label="" currency="" is_last=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td valign="top"><span class="text"><inp2:$prefix_Field field="$field" as_label="$as_label" currency="$currency"/></span></td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_id_label"/>
+ <inp2:m_if check="{$prefix}_FieldEquals" field="$field" value="" inverse="inverse">
+ <inp2:m_ParseBlock name="inp_label" pass_params="true"/>
+ </inp2:m_if>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_box" subfield="" class="" is_last="" maxlength="" onblur="" size="" onkeyup=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" subfield="$subfield" title="$title" is_last="$is_last"/>
+ <td>
+ <input type="text" name="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>" id="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>" value="<inp2:$prefix_Field field="$field" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>" onkeyup="<inp2:m_Param name="onkeyup"/>">
+ <inp2:m_if check="{$prefix}_HasParam" name="hint_label"><span class="small"><inp2:m_phrase label="$hint_label"/></span></inp2:m_if>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_upload" class="" is_last=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td>
+ <input type="file" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>">
+ <inp2:m_if check="$prefix_FieldEquals" name="$field" value="" inverse="inverse">
+ (<inp2:$prefix_Field field="$field"/>)
+ </inp2:m_if>
+ <input type="hidden" name="<inp2:$prefix_InputName field="$field"/>[upload]" id="<inp2:$prefix_InputName field="$field"/>[upload]" value="<inp2:$prefix_Field field="$field"/>">
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_box_ml" class="" size="" maxlength=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text" valign="top">
+ <span class="<inp2:m_if prefix="$prefix" function="HasError" field="$field"/>error<inp2:m_endif/>">
+ <inp2:m_phrase label="$title"/><inp2:m_if prefix="$prefix" function="IsRequired" field="$field"/><span class="error"> *</span></inp2:m_if>:</span><br>
+ <a href="javascript:PreSaveAndOpenTranslator('<inp2:m_param name="prefix"/>', '<inp2:m_param name="field"/>', 'popups/translator');" title="<inp2:m_Phrase label="la_Translate"/>"><img src="img/icons/icon24_translate.gif" style="cursor:hand" border="0"></a>
+ </td>
+ <td>
+ <input type="text" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" format="no_default"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_hidden" db=""/>
+ <input type="hidden" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" db="$db"/>">
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_date" class="" is_last=""/>
+ <inp2:m_if check="m_GetEquals" name="calendar_included" value="1" inverse="inverse">
+ <script type="text/javascript" src="incs/calendar.js"></script>
+ <inp2:m_set calendar_included="1"/>
+ </inp2:m_if>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td>
+ <input type="text" name="<inp2:$prefix_InputName field="{$field}_date"/>" id="<inp2:$prefix_InputName field="{$field}_date"/>" value="<inp2:$prefix_Field field="{$field}_date" format="_regional_InputDateFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:$prefix_Format field="{$field}_date" input_format="1" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif"> <span class="small">(<inp2:$prefix_Format field="{$field}_date" input_format="1" human="true"/>)</span>
+ <script type="text/javascript">
+ initCalendar("<inp2:$prefix_InputName field="{$field}_date"/>", "<inp2:$prefix_Format field="{$field}_date" input_format="1"/>");
+ </script>
+ <input type="hidden" name="<inp2:$prefix_InputName field="{$field}_time"/>" id="<inp2:$prefix_InputName field="{$field}_time" input_format="1"/>" value="">
+ </td>
+ <td class="error"><inp2:$prefix_Error field="{$field}_date"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+
+<inp2:m_block name="inp_edit_date_time" class="" is_last=""/>
+ <inp2:m_if check="m_GetEquals" name="calendar_included" value="1" inverse="inverse">
+ <script type="text/javascript" src="incs/calendar.js"></script>
+ <inp2:m_set calendar_included="1"/>
+ </inp2:m_if>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td>
+ <!-- <input type="hidden" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" db="db"/>"> -->
+ <input type="text" name="<inp2:$prefix_InputName field="{$field}_date"/>" id="<inp2:$prefix_InputName field="{$field}_date"/>" value="<inp2:$prefix_Field field="{$field}_date" format="_regional_InputDateFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:$prefix_Format field="{$field}_date" input_format="1" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif">
+ <span class="small">(<inp2:$prefix_Format field="{$field}_date" input_format="1" human="true"/>)</span>
+ <script type="text/javascript">
+ initCalendar("<inp2:$prefix_InputName field="{$field}_date"/>", "<inp2:$prefix_Format field="{$field}_date" input_format="1"/>");
+ </script>
+ <input type="text" name="<inp2:$prefix_InputName field="{$field}_time"/>" id="<inp2:$prefix_InputName field="{$field}_time"/>" value="<inp2:$prefix_Field field="{$field}_time" format="_regional_InputTimeFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:$prefix_Format field="{$field}_time" input_format="1" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>"><span class="small"> (<inp2:$prefix_Format field="{$field}_time" input_format="1" human="true"/>)</span>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_textarea" class="" allow_html="allow_html"/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text" valign="top">
+ <span class="<inp2:m_if prefix="$prefix" function="HasError" field="$field"/>error<inp2:m_endif/>">
+ <inp2:m_phrase label="$title"/><inp2:m_if prefix="$prefix" function="IsRequired" field="$field"/><span class="error"> *</span><inp2:m_endif/>:</span><br>
+ <inp2:m_if check="m_ParamEquals" name="allow_html" value="allow_html">
+ <a href="javascript:OpenEditor('§ion=in-link:editlink_general','kernel_form','<inp2:$prefix_InputName field="$field"/>');"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
+ </inp2:m_if>
+ </td>
+ <td>
+ <textarea tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" cols="<inp2:m_param name="cols"/>" rows="<inp2:m_param name="rows"/>" class="<inp2:m_param name="class"/>"><inp2:$prefix_Field field="$field"/></textarea>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_textarea_ml" class=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text" valign="top">
+ <span class="<inp2:m_if prefix="$prefix" function="HasError" field="$field"/>error<inp2:m_endif/>">
+ <inp2:m_phrase label="$title"/><inp2:m_if prefix="$prefix" function="IsRequired" field="$field"/><span class="error"> *</span><inp2:m_endif/>:</span><br>
+ <a href="javascript:OpenEditor('§ion=in-link:editlink_general','kernel_form','<inp2:$prefix_InputName field="$field"/>');"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
+ <a href="javascript:PreSaveAndOpenTranslator('<inp2:m_param name="prefix"/>', '<inp2:m_param name="field"/>', 'popups/translator', 1);" title="<inp2:m_Phrase label="la_Translate"/>"><img src="img/icons/icon24_translate.gif" style="cursor:hand" border="0"></a>
+ </td>
+ <td>
+ <textarea tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" cols="<inp2:m_param name="cols"/>" rows="<inp2:m_param name="rows"/>" class="<inp2:m_param name="class"/>"><inp2:$prefix_Field field="$field"/></textarea>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_user" class="" is_last="" old_style="0" onkeyup=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td>
+ <input type="text" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onkeyup="<inp2:m_Param name="onkeyup"/>">
+ <inp2:m_if check="m_ParamEquals" name="old_style" value="1">
+ <a href="#" onclick="return OpenUserSelector('','kernel_form','<inp2:$prefix_InputName field="$field"/>');">
+ <inp2:m_else/>
+ <a href="javascript:openSelector('<inp2:m_param name="prefix"/>', '<inp2:m_t t="user_selector" pass="all,$prefix" escape="1"/>', '<inp2:m_param name="field"/>');">
+ </inp2:m_if>
+ <img src="img/icons/icon24_link_user.gif" style="cursor:hand;" border="0">
+ </a>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+
+<inp2:m_block name="inp_option_item"/>
+ <option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_option_phrase"/>
+ <option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_phrase label="$option"/></option>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_options" is_last="" has_empty="0" empty_value=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td>
+ <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>" onchange="<inp2:m_Param name="onchange"/>">
+ <inp2:m_if prefix="m" function="ParamEquals" name="use_phrases" value="1"/>
+ <inp2:$prefix_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
+ <inp2:m_else/>
+ <inp2:$prefix_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
+ <inp2:m_endif/>
+ </select>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_radio_item"/>
+ <input type="radio" <inp2:m_param name="checked"/> name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="<inp2:m_param name="onclick"/>" onchange="<inp2:m_param name="onchange"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_radio_phrase"/>
+ <input type="radio" <inp2:m_param name="checked"/> name="<inp2:$prefix_InputName field="$field"/>" id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="<inp2:m_param name="onclick"/>" onchange="<inp2:m_param name="onchange"/>"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_radio" is_last="" pass_tabindex="" onclick="" onchange="" use_phrases="1"/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td>
+ <inp2:m_if check="m_ParamEquals" name="use_phrases" value="1">
+ <inp2:$prefix_PredefinedOptions field="$field" tabindex="$pass_tabindex" block="inp_radio_phrase" selected="checked" onclick="$onclick" onchange="$onchange" />
+ <inp2:m_else />
+ <inp2:$prefix_PredefinedOptions field="$field" tabindex="$pass_tabindex" block="inp_radio_item" selected="checked" onclick="$onclick" onchange="$onchange" />
+ </inp2:m_if>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_checkbox" is_last="" field_class="" onchange="" onclick=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last" NamePrefix="_cb_"/>
+ <td>
+ <input type="hidden" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field" db="db"/>">
+ <!--<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:$prefix_InputName field="$field"/>" name="_cb_<inp2:$prefix_InputName field="$field"/>" <inp2:$prefix_Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:$prefix_InputName field="$field"/>'));" onchange="<inp2:m_param name="onchange"/>">-->
+ <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:$prefix_InputName field="$field"/>" name="_cb_<inp2:$prefix_InputName field="$field"/>" <inp2:$prefix_Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onchange="update_checkbox(this, document.getElementById('<inp2:$prefix_InputName field="$field"/>'));<inp2:m_param name="onchange"/>" onclick="<inp2:m_param name="onclick"/>">
+ <inp2:m_if check="{$prefix}_HasParam" name="hint_label"><inp2:m_phrase label="$hint_label"/></inp2:m_if>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+
+<inp2:m_block name="inp_checkbox_item"/>
+ <input type="checkbox" <inp2:m_param name="checked"/> id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="update_checkbox_options(/^<inp2:$prefix_InputName field="$field" as_preg="1"/>_([0-9A-Za-z-]+)/, '<inp2:$prefix_InputName field="$field"/>');"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_checkbox_phrase"/>
+ <input type="checkbox" <inp2:m_param name="checked"/> id="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="update_checkbox_options(/^<inp2:$prefix_InputName field="$field" as_preg="1"/>_([0-9A-Za-z-]+)/, '<inp2:$prefix_InputName field="$field"/>');"><label for="<inp2:$prefix_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_checkboxes" is_last=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+ <td>
+ <inp2:m_if check="m_ParamEquals" name="use_phrases" value="1">
+ <inp2:$prefix_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" hint_label="$hint_label" block="inp_checkbox_phrase" selected="checked"/>
+ <inp2:m_else/>
+ <inp2:$prefix_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" hint_label="$hint_label" block="inp_checkbox_item" selected="checked"/>
+ </inp2:m_if>
+ <inp2:m_ParseBlock prefix="$prefix" name="inp_edit_hidden" field="$field"/>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_checkbox_allow_html"/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td colspan="2">
+ <label for="_cb_<inp2:m_param name="field"/>"><inp2:m_phrase label="la_enable_html"/></label>
+ <input type="hidden" id="<inp2:$prefix_InputName field="$field"/>" name="<inp2:$prefix_InputName field="$field"/>" value="<inp2:$prefix_Field field="$field"/>">
+ <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:m_param name="field"/>" <inp2:$prefix_Field field="$field" checked="checked"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:$prefix_InputName field="$field"/>'))">
+ <br>
+ <span class="hint"><img src="img/smicon7.gif" width="14" height="14" align="absmiddle"><inp2:m_phrase label="la_Warning_Enable_HTML"/></span>
+
+ </td>
+ <td> </td>
+ </tr>
+<inp2:m_blockend/>
+
+<inp2:m_block name="inp_edit_weight" subfield="" class="" is_last="" maxlength=""/>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <inp2:m_ParseBlock name="inp_edit_field_caption" prefix="$prefix" field="$field" subfield="$subfield" title="$title" is_last="$is_last"/>
+ <td>
+ <inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
+ <input type="text" name="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>" id="<inp2:$prefix_InputName field="$field" subfield="$subfield"/>" value="<inp2:$prefix_Field field="$field" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
+ <inp2:m_phrase label="la_kg" />
+ </inp2:m_if>
+ <inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
+ <input type="text" name="<inp2:$prefix_InputName field="{$field}_a" subfield="$subfield"/>" id="<inp2:$prefix_InputName field="{$field}_a" subfield="$subfield"/>" value="<inp2:$prefix_Field field="{$field}_a" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
+ <inp2:m_phrase label="la_lbs" />
+ <input type="text" name="<inp2:$prefix_InputName field="{$field}_b" subfield="$subfield"/>" id="<inp2:$prefix_InputName field="{$field}_b" subfield="$subfield"/>" value="<inp2:$prefix_Field field="{$field}_b" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
+ <inp2:m_phrase label="la_oz" />
+ </inp2:m_if>
+ </td>
+ <td class="error"><inp2:$prefix_Error field="$field"/> </td>
+ <inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
+ <inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
+ </inp2:m_if>
+ </tr>
+<inp2:m_blockend />
+
+
+<inp2:m_DefineElement name="ajax_progress_bar">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <tr class="table_color1">
+ <td colspan="2">
+ <img src="img/spacer.gif" height="10" width="1" alt="" /><br />
+ <!-- progress bar paddings: begin -->
+ <table width="90%" cellpadding="2" cellspacing="0" border="0" align="center">
+ <tr>
+ <td class="progress-text">0%</td>
+ <td width="100%">
+ <!-- progress bar: begin -->
+ <table cellspacing="0" cellpadding="0" width="100%" border="0" align="center" style="background-color: #FFFFFF; border: 1px solid #E6E6E6;">
+ <tr>
+ <td colspan="3"><img src="img/spacer.gif" height="2" width="1" alt="" /></td>
+ </tr>
+ <tr>
+ <td width="2"><img src="img/spacer.gif" height="13" width="3" alt="" /></td>
+ <td align="center" width="100%">
+ <table cellspacing="0" cellpadding="0" width="100%" border="0" style="background: url(img/progress_left.gif) repeat-x;">
+ <tr>
+ <td id="progress_bar[done]" style="background: url(img/progress_done.gif);" align="left"></td>
+ <td id="progress_bar[left]" align="right"><img src="img/spacer.gif" height="9" width="1" alt="" /></td>
+ </tr>
+ </table>
+ </td>
+ <td width="1"><img src="img/spacer.gif" height="13" width="3" alt="" /></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="img/spacer.gif" height="2" width="1" alt="" /></td>
+ </tr>
+ </table>
+ <!-- progress bar: end -->
+ </td>
+ <td class="progress-text">100%</td>
+ </tr>
+ </table>
+ <!-- progress bar paddings: end -->
+ <img src="img/spacer.gif" height="10" width="1" alt="" /><br />
+ </td>
+ </tr>
+ <tr class="table_color2">
+ <td width="50%" align="right"><inp2:m_phrase name="la_fld_PercentsCompleted"/>:</td>
+ <td id="progress_display[percents_completed]">0%</td>
+ </tr>
+ <tr class="table_color1">
+ <td align="right"><inp2:m_phrase name="la_fld_ElapsedTime"/>:</td>
+ <td id="progress_display[elapsed_time]">00:00</td>
+ </tr>
+ <tr class="table_color2">
+ <td align="right"><inp2:m_phrase name="la_fld_EstimatedTime"/>:</td>
+ <td id="progress_display[Estimated_time]">00:00</td>
+ </tr>
+ <tr class="table_color1">
+ <td align="center" colspan="2">
+ <input type="button" class="button" onclick="<inp2:m_param name="cancel_action"/>" value="<inp2:m_phrase name="la_Cancel"/>" />
+ </td>
+ </tr>
+ </table>
+</inp2:m_DefineElement>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/incs/form_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/summary/root.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/admin_templates/summary/root.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/admin_templates/summary/root.tpl (revision 6788)
@@ -0,0 +1,154 @@
+
+ <!-- overview box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+ <tr>
+ <td class="overviewbox_header">
+ <table cellpadding="0" cellspacing="0" width="100%">
+ <td valign="middle" align="left">
+ <img src="img/summary/overviewbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <span class="overview">Overview</span>
+ </td>
+ <td class="info" valign="middle" align="right">
+ <span class="overviewDate"><inp2:adm_TodayDate format="F j, Y"/></span>
+ </td>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="overviewbox_body" colspan="2">
+ <table cellspacing="0" cellpadding="0" width="100%">
+ <inp2:m_DefineElement name="stat_element">
+ <td class="<inp2:m_if check="m_ParamEquals" name="column_number" value="1">oInfo<inp2:m_else/>oValue</inp2:m_if>" align="center">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="70%" nowrap>
+ <inp2:Field name="ListLabel" as_label="1"/>:
+ </td>
+ <td width="30%" nowrap>
+ <inp2:CalculateValue field="ValueSQL"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </inp2:m_DefineElement>
+
+ <inp2:stat.summary_PrintList2 render_as="stat_element" columns="2"/>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ <!-- overview box: end -->
+
+ <!-- user search box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+ <tr>
+ <td class="searchbox_header">
+ <img src="img/summary/searchbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <inp2:m_phrase name="la_section_UsersSearch"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="searchbox_body">
+ <script type="text/javascript">
+ function doSearch()
+ {
+ submit_action('<inp2:m_t index_file="users/user_list.php" pass="m" escape="1"/>', 'm_user_search');
+ }
+ </script>
+
+ <img src="img/spacer.gif" width="12" height="13"><br />
+ <input name="list_search" class="search" type="text">
+ <img src="img/toolbar/icon16_search.gif" width="22" height="22" align="absMiddle" onclick="doSearch();">
+ </td>
+ </tr>
+ </table>
+ <!-- user search box: end -->
+
+ <!-- pending items box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+
+ <tr>
+ <td class="usersbox_header">
+ <img src="img/summary/usersbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <inp2:m_phrase name="la_prompt_PendingItems"/> <span class="info">(<inp2:stat_GetTotalPending/>)</span>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="usersbox_body">
+ <table width="100%" cellpadding="3" cellspacing="0">
+ <inp2:m_DefineElement name="stat_element">
+ <inp2:m_if check="m_ParamEquals" name="is_first" value="1">
+ <inp2:m_if check="m_ParamEquals" name="column_number" value="1">
+ <inp2:m_set cell_class="lTD"/>
+ <inp2:m_else/>
+ <inp2:m_set cell_class="rTD"/>
+ </inp2:m_if>
+ <inp2:m_else/>
+ <inp2:m_if check="m_ParamEquals" name="column_number" value="1">
+ <inp2:m_set cell_class="lTDi"/>
+ <inp2:m_else/>
+ <inp2:m_set cell_class="rTDi"/>
+ </inp2:m_if>
+ </inp2:m_if>
+
+ <td width="50%" class="<inp2:m_get name="cell_class"/>">
+ <img src="<inp2:$prefix_ModulePath/>img/itemicons/<inp2:m_param name="icon"/>" border="0" alt="" title="" />
+ <a href="<inp2:m_param name="url"/>" class="userslink"><inp2:m_phrase name="$label"/></a> <span class="info">(<inp2:CountPending prefix="$prefix"/>)</span>
+ </td>
+ </inp2:m_DefineElement>
+ <inp2:stat_PrintPendingStatistics render_as="stat_element" columns="2"/>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <!-- pending items box: end -->
+
+ <!-- quick links box: begin -->
+ <table cellspacing="0" cellpadding="0" width="269">
+ <tr>
+ <td class="overviewbox_header">
+ <img src="img/summary/overviewbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">
+ <inp2:m_phrase name="la_section_QuickLinks"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: 10px;" class="overviewbox_body">
+ <table width="100%" cellspacing="0" cellpadding="4">
+ <tr>
+ <td>
+ <a class="userslink" href="<inp2:m_t t="in-portal/catalog" pass="m"/>">
+ <img hSpace="3" src="img/icons/icon24_navigate.gif" border="0" align="absMiddle">
+ <inp2:m_phrase name="la_Text_Catalog"/>
+ </a>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <a class="userslink" href="<inp2:m_t t="users/users_list" index_file="users/user_list.php" pass="m"/>">
+ <img hSpace="3" src="img/icons/icon24_users.gif" border="0" align="absMiddle">
+ <inp2:m_phrase name="la_Text_Users"/>
+ </a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <!-- quick links box: end -->
+
+
+
+
+
+
+
+
+
+
+
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/admin_templates/summary/root.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Event Timeline
Log In to Comment