Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Sep 23, 4:42 AM

in-portal

Index: branches/unlabeled/unlabeled-1.7.2/kernel/units/general/helpers/multilanguage.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/units/general/helpers/multilanguage.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/units/general/helpers/multilanguage.php (revision 5521)
@@ -0,0 +1,234 @@
+<?php
+
+ /**
+ * Performs action on multilingual fields
+ *
+ */
+ class kMultiLanguageHelper extends kHelper {
+
+ var $languageCount = 0;
+
+ /**
+ * Structure of table, that is currently processed
+ *
+ * @var Array
+ */
+ var $curStructure = Array();
+
+ /**
+ * Field, to get structure information from
+ *
+ * @var string
+ */
+ var $curSourceField = false;
+
+ /**
+ * Indexes used in table of 32
+ *
+ * @var int
+ */
+ var $curIndexCount = 0;
+
+ /**
+ * Fields from config, that are currently used
+ *
+ * @var Array
+ */
+ var $curFields = Array();
+
+ function kMultiLanguageHelper()
+ {
+ parent::kHelper();
+ $this->languageCount = $this->getLanguageCount();
+ }
+
+ /**
+ * Returns language count in system (always is divisible by 5)
+ *
+ */
+ function getLanguageCount()
+ {
+ $table_name = $this->Application->getUnitOption('lang', 'TableName');
+ $languages_count = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$table_name);
+ if (!$languages_count) {
+ // during installation we have not languages, but we need to created custom field columns
+ $languages_count = 1;
+ }
+ return $languages_count + 5 - ( $languages_count % 5 ? ($languages_count % 5) : 5 );
+ }
+
+
+ function scanTable($mask)
+ {
+ $i = 0;
+ $fields_found = 0;
+ $fields = array_keys($this->curStructure);
+
+ foreach ($fields as $field_name) {
+ if (preg_match($mask, $field_name)) {
+ $fields_found++;
+ }
+ }
+ return $fields_found;
+ }
+
+ function readTableStructure($table_name)
+ {
+ static $structure_status = Array();
+
+ if (!getArrayValue($structure_status, $table_name)) {
+ $this->curStructure = $this->Conn->Query('DESCRIBE '.$table_name, 'Field');
+ $this->curIndexCount = count($this->Conn->Query('SHOW INDEXES FROM '.$table_name));
+ $structure_status[$table_name] = true;
+ }
+ }
+
+ /**
+ * Creates missing multilanguage fields in table by specified prefix
+ *
+ * @param string $prefix
+ * @param bool $refresh Forces config field structure to be re-read from database
+ */
+ function createFields($prefix, $refresh = false)
+ {
+ if ($refresh) {
+ $this->Application->HandleEvent( new kEvent($prefix.':OnCreateCustomFields') );
+ }
+
+ $table_name = $this->Application->getUnitOption($prefix, 'TableName');
+ $this->curFields = $this->Application->getUnitOption($prefix, 'Fields');
+
+ if (!($table_name && $this->curFields) ) {
+ // invalid config found or prefix not found
+ return true;
+ }
+
+ $sqls = Array();
+ foreach($this->curFields as $field_name => $field_options)
+ {
+ if (getArrayValue($field_options, 'formatter') == 'kMultiLanguage') {
+ $this->readTableStructure($table_name);
+
+ $created_count = $this->getCreatedCount($field_name);
+ $create_count = $this->languageCount - $created_count;
+ if ($create_count > 0) {
+ // `l77_Name` VARCHAR( 255 ) NULL DEFAULT '0';
+ $field_mask = Array();
+ $field_mask['name'] = 'l%s_'.$field_name;
+ $field_mask['null'] = getArrayValue($field_options, 'not_null') ? 'NOT NULL' : 'NULL';
+
+ if ($this->curSourceField) {
+ $default_value = $this->getFieldParam('Default') != 'NULL' ? $this->Conn->qstr($this->getFieldParam('Default')) : $this->getFieldParam('Default');
+ $field_mask['type'] = $this->getFieldParam('Type');
+ }
+ else {
+ $default_value = is_null($field_options['default']) ? 'NULL' : $this->Conn->qstr($field_options['default']);
+ $field_mask['type'] = $field_options['db_type'];
+ }
+ $field_mask['default'] = 'DEFAULT '.$default_value;
+ $field_mask = $field_mask['name'].' '.$field_mask['type'].' '.$field_mask['null'].' '.$field_mask['default'];
+
+ $sqls[] = 'ALTER TABLE '.$table_name.( $this->generateAlterSQL($field_mask, $created_count + 1, $create_count) );
+ }
+ }
+ }
+
+ foreach ($sqls as $sql_query) {
+ $this->Conn->Query($sql_query);
+ }
+ }
+
+ function deleteField($prefix, $custom_id)
+ {
+ $table_name = $this->Application->getUnitOption($prefix, 'TableName');
+ $sql = 'DESCRIBE '.$table_name.' "l%_cust_'.$custom_id.'"';
+ $fields = $this->Conn->GetCol($sql);
+
+ $sql = 'ALTER TABLE '.$table_name.' ';
+ $sql_template = 'DROP COLUMN %s, ';
+ foreach ($fields as $field_name) {
+ $sql .= sprintf($sql_template, $field_name);
+ }
+ $sql = preg_replace('/(.*), $/', '\\1', $sql);
+ $this->Conn->Query($sql);
+ }
+
+ /**
+ * Returns parameter requested of current source field
+ *
+ * @param string $param_name
+ * @return string
+ */
+ function getFieldParam($param_name)
+ {
+ return $this->curStructure[$this->curSourceField][$param_name];
+ }
+
+ function getCreatedCount($field_name)
+ {
+ $ret = $this->scanTable('/^l[\d]+_'.preg_quote($field_name, '/').'/');
+ if (!$ret) {
+ // no multilingual fields at all (but we have such field without language prefix)
+ $original_found = $this->scanTable('/'.preg_quote($field_name, '/').'/');
+ $this->curSourceField = $original_found ? $field_name : false;
+ }
+ else {
+ $this->curSourceField = 'l1_'.$field_name;
+ }
+ return $ret;
+ }
+ /**
+ * Returns ALTER statement part for adding required fields to table
+ *
+ * @param string $field_mask sql mask for creating field with correct definition (type & size)
+ * @param int $start_index add new fields starting from this index
+ * @param int $create_count create this much new multilingual field translations
+ * @return string
+ */
+ function generateAlterSQL($field_mask, $start_index, $create_count)
+ {
+ static $single_lang = null;
+ if (!isset($single_lang)) {
+ // if single language mode, then create indexes only on primary columns
+ $table_name = $this->Application->getUnitOption('lang', 'TableName');
+ $sql = 'SELECT COUNT(*)
+ FROM '.$table_name.'
+ WHERE Enabled = 1';
+ // if language count = 0, then assume it's multi language mode
+ $single_lang = $this->Conn->GetOne($sql) == 1;
+ }
+
+ $ret = ' ';
+ $i_count = $start_index + $create_count;
+ while ($start_index < $i_count) {
+ list($prev_field,$type) = explode(' ', sprintf($field_mask, $start_index - 1) );
+ if (substr($prev_field, 0, 3) == 'l0_') {
+ $prev_field = substr($prev_field, 3, strlen($prev_field));
+ if (!$this->curSourceField) {
+ // get field name before this one
+ $fields = array_keys($this->curFields);
+ $prev_field = $fields[array_search($prev_field, $fields) - 1];
+ if (getArrayValue($this->curFields[$prev_field], 'formatter') == 'kMultiLanguage') {
+ $prev_field = 'l'.$this->languageCount.'_'.$prev_field;
+ }
+ }
+ }
+
+ $field_expression = sprintf($field_mask, $start_index);
+ $ret .= 'ADD COLUMN '.$field_expression.' AFTER `'.$prev_field.'`, ';
+
+ if ($this->curIndexCount < 32 && ($start_index == $this->Application->GetDefaultLanguageId() || !$single_lang)) {
+ // create index for primary language column + for all others (if multiple languages installed)
+ list($field_name, $field_params) = explode(' ', $field_expression, 2);
+ $ret .= 'ADD INDEX (`'.$field_name.'` (5) ), ';
+ $this->curIndexCount++;
+ }
+
+ $start_index++;
+ }
+ return preg_replace('/, $/',';',$ret);
+ }
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/units/general/helpers/multilanguage.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/units/category_items/category_items_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/units/category_items/category_items_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/units/category_items/category_items_event_handler.php (revision 5521)
@@ -0,0 +1,113 @@
+<?php
+
+ class CategoryItemsEventHander extends InpDBEventHandler
+ {
+ /**
+ * Set's new category as primary for product
+ *
+ * @param kEvent $event
+ */
+ function OnSetPrimary(&$event)
+ {
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ $this->StoreSelectedIDs($event);
+ $ids=$this->getSelectedIDs($event);
+ if($ids)
+ {
+ $id = array_shift($ids);
+ $table_info = $object->getLinkedInfo();
+
+ $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+ $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (CategoryId = '.$id.')');
+ }
+ $event->redirect_params = Array('opener' => 's', 'pass_events' => true); //stay!
+ }
+
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ */
+ function customProcessing(&$event, $type)
+ {
+ if($event->Name == 'OnMassDelete')
+ {
+ $object =& $event->getObject();
+ $table_info = $object->getLinkedInfo();
+
+ switch ($type)
+ {
+ case 'before':
+ $ids = $event->getEventParam('ids');
+ if($ids)
+ {
+ $ids = $this->Conn->GetCol('SELECT CategoryId FROM '.$object->TableName.' WHERE (PrimaryCat=0) AND ('.$table_info['ForeignKey'].'='.$table_info['ParentId'].') AND CategoryId IN ('.implode(',',$ids).')');
+ $event->setEventParam('ids',$ids);
+ }
+ break;
+
+ // not needed because 'before' does not allow to delete primary cat!
+ /*case 'after':
+ // set 1st not deleted category as primary
+ $has_primary = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$object->TableName.' WHERE (PrimaryCat=1) AND ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].')');
+ if(!$has_primary)
+ {
+ $cat_id = $this->Conn->GetOne('SELECT CategoryId FROM '.$object->TableName.' WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+ $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (CategoryId = '.$cat_id.')');
+ }
+ break;*/
+ }
+ }
+ }
+
+ /**
+ * Removes primary mark from cloned category items record
+ *
+ * @param kEvent $event
+ */
+ function OnAfterClone(&$event)
+ {
+ $id = $event->getEventParam('id');
+ $table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
+ $sql = 'UPDATE %s SET PrimaryCat = 0 WHERE %s = %s';
+
+ $this->Conn->Query( sprintf($sql, $table, $id_field, $id) );
+ }
+
+ /**
+ * Deletes items of requested type from requested categories.
+ * In case if item is deleted from it's last category, then delete item too.
+ *
+ * @param kEvent $event
+ */
+ function OnDeleteFromCategory(&$event)
+ {
+ $category_ids = $event->getEventParam('category_ids');
+ if(!$category_ids) return false;
+
+ $item_prefix = $event->getEventParam('item_prefix');
+ $item =& $this->Application->recallObject($item_prefix.'.-item', null, Array('skip_autoload' => true));
+
+ $ci_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $item_table = $this->Application->getUnitOption($item_prefix, 'TableName');
+
+ $sql = 'SELECT ItemResourceId, CategoryId FROM %1$s INNER JOIN %2$s ON (%1$s.ResourceId = %2$s.ItemResourceId) WHERE CategoryId IN (%3$s)';
+ $category_items = $this->Conn->Query( sprintf($sql, $item_table, $ci_table, implode(',', $category_ids) ) );
+
+ $item_hash = Array();
+ foreach($category_items as $ci_row)
+ {
+ $item_hash[ $ci_row['ItemResourceId'] ][] = $ci_row['CategoryId'];
+ }
+
+ foreach($item_hash as $item_resource_id => $delete_category_ids)
+ {
+ $item->Load($item_resource_id, 'ResourceId');
+ $item->DeleteFromCategories($delete_category_ids);
+ }
+ }
+
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/units/category_items/category_items_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl (revision 5521)
@@ -0,0 +1,52 @@
+<inp2:m_RequireLogin login_template="login"/>
+<inp2:adm_SetConst name="DBG_SKIP_REPORTING" value="1"/>
+<!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">-->
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=<inp2:lang_GetCharset/>">
+ <title>In-portal Administration</title>
+ <inp2:m_base_ref/>
+
+ <link rel="icon" href="img/favicon.ico" type="image/x-icon" />
+ <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
+ <link rel="stylesheet" rev="stylesheet" href="incs/style.css" type="text/css" />
+
+ <script type="text/javascript">
+ window.name = 'main_frame';
+ lala = navigator.appVersion.substring(0,1);
+
+ if (navigator.appName == "Netscape") {
+ if (lala != "5") {
+ document.write("<frameset rows='96,*' framespacing='0' scrolling='no' frameborder='0'>");
+ } else {
+ document.write("<frameset rows='95,*' framespacing='0' scrolling='no' frameborder='0'>");
+ }
+ } else {
+ document.write("<frameset rows='94,*' framespacing='0' scrolling='no' frameborder='0'>");
+ }
+
+ function getFrame($name)
+ {
+ var $frameset = window.frames;
+ for ($i = 0; $i < window.length; $i++) {
+ if ($frameset[$i].name == $name) {
+ return $frameset[$i];
+ }
+ }
+ return window;
+ }
+ </script>
+ </head>
+
+ <frame src="<inp2:m_t t="head" pass="m" m_cat_id="0"/>" name="head" scrolling="no" noresize>
+ <frameset cols="200,*" border="0">
+ <frame src="<inp2:m_t t="tree" pass="m" m_cat_id="0" m_opener="p"/>" name="menu" target="main" noresize scrolling="auto" marginwidth="0" marginheight="0">
+ <frame src="<inp2:m_t t="sections_list" section="in-portal:root" module="In-Portal" pass="m" m_cat_id="0"/>" name="main" marginwidth="0" marginheight="0" frameborder="no" noresize scrolling="auto">
+ </frameset>
+ </frameset>
+ <noframes>
+ <body bgcolor="#FFFFFF">
+ <p></p>
+ </body>
+ </noframes>
+</html>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/incs/custom_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/incs/custom_blocks.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/incs/custom_blocks.tpl (revision 5521)
@@ -0,0 +1,67 @@
+<inp2:m_DefineElement name="config_edit_text">
+ <input type="text" name="<inp2:CustomInputName/>" value="<inp2:Field field="$field"/>" />
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_password">
+ <input type="password" primarytype="password" name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>" value="" />
+ <input type="password" name="verify_<inp2:CustomInputName/>" id="verify_<inp2:CustomInputName/>" value="" />
+ &nbsp;<span class="error" id="error_<inp2:CustomInputName/>"></span>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_option">
+ <option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_select">
+ <select name="<inp2:CustomInputName/>">
+ <inp2:PredefinedOptions field="$field" tabindex="$pass_tabindex" block="config_edit_option" selected="selected"/>
+ </select>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_checkbox">
+ <input type="hidden" id="<inp2:CustomInputName/>" name="<inp2:CustomInputName/>" value="<inp2:Field field="$field" db="db"/>">
+ <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:Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:CustomInputName/>'))">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_textarea">
+ <textarea name="<inp2:CustomInputName/>" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_radio_item">
+ <input type="radio" <inp2:m_param name="checked"/> name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:CustomInputName/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_radio">
+ <inp2:PredefinedOptions field="$field" tabindex="$pass_tabindex" block="config_radio_item" selected="checked"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="cv_row_block">
+ <inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
+ <tr class="subsectiontitle">
+ <td colspan="5">
+ <inp2:Field name="Heading" as_label="1"/>
+ </td>
+ </tr>
+ </inp2:m_if>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>" >
+ <inp2:m_ParseBlock name="grid_data_label_ml_td" grid="$grid" SourcePrefix="$SourcePrefix" value_field="$value_field" ElementTypeField="ElementType" field="Prompt" PrefixSpecial="$PrefixSpecial"/>
+ <td valign="top" class="text">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+ <td class="error">&nbsp;</td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="edit_custom_td">
+ <td valign="top" class="text">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+</inp2:m_DefineElement>
+
+<!--<inp2:m_DefineElement name="edit_custom_td">
+ <td valign="top" class="text">
+ <input type="hidden" name="<inp2:InputName field="ResourceId"/>" id="<inp2:InputName field="ResourceId"/>" value="<inp2:Field field="ResourceId" grid="$grid"/>">
+ <input type="hidden" name="<inp2:InputName field="CustomDataId"/>" id="<inp2:InputName field="CustomDataId"/>" value="<inp2:Field field="CustomDataId" grid="$grid"/>">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+</inp2:m_DefineElement>-->
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/incs/custom_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/admin/backup/restore3.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/admin/backup/restore3.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/admin/backup/restore3.php (revision 5521)
@@ -0,0 +1,118 @@
+<?php
+
+// new startup: begin
+define('REL_PATH', 'admin/backup');
+$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
+checkViewPermission('in-portal:restore');
+
+$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/toolbar.php");
+require_once($pathtoroot.$admin."/install/install_lib.php");
+
+$conn = &GetADODBConnection();
+$section = "in-portal:restore";
+int_header(NULL);
+//echo "FileOffset: $FileOffset <br>\n";
+if(count($_POST))
+{
+ $filename = "dump".$_POST["backupdate"]."txt";
+ $filename = $objConfig->Get("Backup_Path")."/".$filename;
+}
+else
+ $filename = $_GET["Filename"];
+
+$FileOffset = (int)$_GET["Offset"];
+//echo "FileOffset: $FileOffset <br>\n";
+if(!file_exists($filename))
+{
+ echo prompt_language("la_restore_file_not_found")." : $filename";
+ exit();
+}
+if(!is_readable($filename))
+{
+ echo prompt_language("la_restore_access_denied");
+ exit();
+}
+
+$TotalSize = filesize($filename);
+
+$MaxLines = 200;
+
+$PageTitle = admin_language("la_text_Restore_in_progress");
+$CancelURL = $rootURL ."admin/backup/restore1.php?env=".BuildEnv();
+
+stats($PageTitle,$FileOffset,$TotalSize);
+//echo "FileOffset: $FileOffset <br>\n";
+if($FileOffset < $TotalSize)
+{
+ $FileOffset = RunRestoreFile($conn,$filename,$FileOffset,$MaxLines);
+ if($FileOffset>-1)
+ {
+ if($FileOffset ==0)
+ $FileOffset = $TotalSize;
+ $url = $_SERVER['PHP_SELF']."?env=".BuildEnv()."&Offset=$FileOffset&Filename=$filename";
+ }
+ 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;
+ }
+ echo $error;
+ die();
+ }
+}
+else
+ $url = $adminURL."/backup/restore4.php?env=".BuildEnv();
+
+reload($url);
+echo "</BODY>";
+echo "</HTML>";
+
+function stats($caption,$myprogress,$totalnum)
+{
+ global $rootURL, $CancelURL;
+
+ if($totalnum>0)
+ {
+ $pct=round(($myprogress/ $totalnum)*100);
+ }
+ else
+ $pct = 100;
+ $o .="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableborder\">";
+
+ echo "\n";
+ $o .= int_subsection_title_ret($caption."-".$pct."%");
+ $o .= "<TR><TD align=\"middle\"><br />";
+ $o .= " <TABLE CLASS=\"tableborder_full\" width=\"75%\">";
+ $o .=" <TR border=1><TD width=\"".$pct."%\" STYLE=\"background:url('".$rootURL."admin/images/progress_bar_segment.gif');\">&nbsp;</TD>";
+ $comp_pct = 100-$pct;
+ $o .= " <TD bgcolor=#FFFFFF width=\"".$comp_pct."%\"></TD></TR>";
+ $o .= " </TABLE>";
+ $o .= " <BR /><input type=button VALUE=\"".admin_language("la_Cancel")."\" CLASS=\"button\" ONCLICK=\"document.location='".$CancelURL."';\">";
+ echo $o."\n";
+ echo "</TD></TR></TABLE>";
+}
+
+function reload($url)
+{
+ print "<script language=\"javascript\">" ;
+ print "setTimeout(\"document.location='$url';\",40);";
+ print " </script>";
+ echo "<A HREF=\"$url\">$url </A>";
+}
+?>
Property changes on: branches/unlabeled/unlabeled-1.7.2/admin/backup/restore3.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/admin/import/step2.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/admin/import/step2.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/admin/import/step2.php (revision 5521)
@@ -0,0 +1,76 @@
+<?php
+
+// new startup: begin
+define('REL_PATH', 'admin/import');
+$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
+checkViewPermission('in-portal:main_import');
+
+$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."/toolbar.php");
+ //Set Section
+ $section = "in-portal:main_import";
+
+ //Set Environment Variable
+ $envar = "env=" . BuildEnv();
+ $var = '?env='.BuildEnv();
+
+ $sec = $objSections->GetSection($section);
+ $objCatToolBar = new clsToolBar();
+
+ // Previous Button
+ $MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
+ $MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
+ $link = $adminURL.'/import/step1.php'.$var;
+ $objCatToolBar->Add('moveleft','la_ToolTip_PreviousStep', $link, $MouseOver, $MouseOut,'','tool_prev.gif');
+
+ // Next Button
+ $MouseOver = "if( ChoiseMade('import_form','choose') !== false ) swap('moveright','toolbar/tool_next_f2.gif');";
+ $MouseOut = "if( ChoiseMade('import_form','choose') !== false ) swap('moveright', 'toolbar/tool_next.gif');";
+
+ if($ro_perm)
+ {
+ $click_url = $adminURL."/import/step1.php".$var;
+ $onClick = "if( ChoiseMade('import_form','choose') ) document.location= '$click_url'; ";
+ }
+ else
+ {
+ $application =& kApplication::Instance();
+ $click_url = $application->HREF('import_redirect', '', null, 'index4.php'); // $adminURL."/import/step3.php".$var;
+ $onClick = "ImportRedirect('import_form', ChoiseMade('import_form','choose'), '$click_url');";
+ }
+ $objCatToolBar->Add("moveright",'la_ToolTip_NextStep','#',$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif");
+
+ // header
+ $title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 2";
+ int_header($objCatToolBar,NULL,$title);
+
+ $objSession->SetVariable("ReturnScript", 'browse.php'); // return to catalog if import is made
+
+?>
+<form name="import_form" id="import_form" method="post" action="<?php echo $click_url; ?>">
+ <input type="hidden" name="import_id" id="import_id" value="">
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+
+ <?php int_subsection_title("Import Source"); ?>
+ <tr <?php echo int_table_color(); ?>>
+ <td><span class="text">Select the program you are importing the data from:</span></td>
+ </tr>
+ <tr <?php echo int_table_color(); ?>>
+ <td>
+ <?php
+ foreach($import_scripts as $id => $iscript)
+ echo '<input type="radio" name="choose" id="ch'.$id.'" value="'.$id.'" onclick="swap(\'moveright\', \'toolbar/tool_next.gif\')"'.(!$iscript['enabled'] ? ' disabled="true"' : '').'><span class="text"><label for="ch'.$id.'">'.$iscript['label'].'</label></span><br />'."\n";
+ ?>
+ </td>
+ </tr>
+</table>
+</form>
+<?php
+int_footer();
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/admin/import/step2.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/units/general/helpers/multilanguage.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/units/general/helpers/multilanguage.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/units/general/helpers/multilanguage.php (revision 5521)
@@ -0,0 +1,234 @@
+<?php
+
+ /**
+ * Performs action on multilingual fields
+ *
+ */
+ class kMultiLanguageHelper extends kHelper {
+
+ var $languageCount = 0;
+
+ /**
+ * Structure of table, that is currently processed
+ *
+ * @var Array
+ */
+ var $curStructure = Array();
+
+ /**
+ * Field, to get structure information from
+ *
+ * @var string
+ */
+ var $curSourceField = false;
+
+ /**
+ * Indexes used in table of 32
+ *
+ * @var int
+ */
+ var $curIndexCount = 0;
+
+ /**
+ * Fields from config, that are currently used
+ *
+ * @var Array
+ */
+ var $curFields = Array();
+
+ function kMultiLanguageHelper()
+ {
+ parent::kHelper();
+ $this->languageCount = $this->getLanguageCount();
+ }
+
+ /**
+ * Returns language count in system (always is divisible by 5)
+ *
+ */
+ function getLanguageCount()
+ {
+ $table_name = $this->Application->getUnitOption('lang', 'TableName');
+ $languages_count = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$table_name);
+ if (!$languages_count) {
+ // during installation we have not languages, but we need to created custom field columns
+ $languages_count = 1;
+ }
+ return $languages_count + 5 - ( $languages_count % 5 ? ($languages_count % 5) : 5 );
+ }
+
+
+ function scanTable($mask)
+ {
+ $i = 0;
+ $fields_found = 0;
+ $fields = array_keys($this->curStructure);
+
+ foreach ($fields as $field_name) {
+ if (preg_match($mask, $field_name)) {
+ $fields_found++;
+ }
+ }
+ return $fields_found;
+ }
+
+ function readTableStructure($table_name)
+ {
+ static $structure_status = Array();
+
+ if (!getArrayValue($structure_status, $table_name)) {
+ $this->curStructure = $this->Conn->Query('DESCRIBE '.$table_name, 'Field');
+ $this->curIndexCount = count($this->Conn->Query('SHOW INDEXES FROM '.$table_name));
+ $structure_status[$table_name] = true;
+ }
+ }
+
+ /**
+ * Creates missing multilanguage fields in table by specified prefix
+ *
+ * @param string $prefix
+ * @param bool $refresh Forces config field structure to be re-read from database
+ */
+ function createFields($prefix, $refresh = false)
+ {
+ if ($refresh) {
+ $this->Application->HandleEvent( new kEvent($prefix.':OnCreateCustomFields') );
+ }
+
+ $table_name = $this->Application->getUnitOption($prefix, 'TableName');
+ $this->curFields = $this->Application->getUnitOption($prefix, 'Fields');
+
+ if (!($table_name && $this->curFields) ) {
+ // invalid config found or prefix not found
+ return true;
+ }
+
+ $sqls = Array();
+ foreach($this->curFields as $field_name => $field_options)
+ {
+ if (getArrayValue($field_options, 'formatter') == 'kMultiLanguage') {
+ $this->readTableStructure($table_name);
+
+ $created_count = $this->getCreatedCount($field_name);
+ $create_count = $this->languageCount - $created_count;
+ if ($create_count > 0) {
+ // `l77_Name` VARCHAR( 255 ) NULL DEFAULT '0';
+ $field_mask = Array();
+ $field_mask['name'] = 'l%s_'.$field_name;
+ $field_mask['null'] = getArrayValue($field_options, 'not_null') ? 'NOT NULL' : 'NULL';
+
+ if ($this->curSourceField) {
+ $default_value = $this->getFieldParam('Default') != 'NULL' ? $this->Conn->qstr($this->getFieldParam('Default')) : $this->getFieldParam('Default');
+ $field_mask['type'] = $this->getFieldParam('Type');
+ }
+ else {
+ $default_value = is_null($field_options['default']) ? 'NULL' : $this->Conn->qstr($field_options['default']);
+ $field_mask['type'] = $field_options['db_type'];
+ }
+ $field_mask['default'] = 'DEFAULT '.$default_value;
+ $field_mask = $field_mask['name'].' '.$field_mask['type'].' '.$field_mask['null'].' '.$field_mask['default'];
+
+ $sqls[] = 'ALTER TABLE '.$table_name.( $this->generateAlterSQL($field_mask, $created_count + 1, $create_count) );
+ }
+ }
+ }
+
+ foreach ($sqls as $sql_query) {
+ $this->Conn->Query($sql_query);
+ }
+ }
+
+ function deleteField($prefix, $custom_id)
+ {
+ $table_name = $this->Application->getUnitOption($prefix, 'TableName');
+ $sql = 'DESCRIBE '.$table_name.' "l%_cust_'.$custom_id.'"';
+ $fields = $this->Conn->GetCol($sql);
+
+ $sql = 'ALTER TABLE '.$table_name.' ';
+ $sql_template = 'DROP COLUMN %s, ';
+ foreach ($fields as $field_name) {
+ $sql .= sprintf($sql_template, $field_name);
+ }
+ $sql = preg_replace('/(.*), $/', '\\1', $sql);
+ $this->Conn->Query($sql);
+ }
+
+ /**
+ * Returns parameter requested of current source field
+ *
+ * @param string $param_name
+ * @return string
+ */
+ function getFieldParam($param_name)
+ {
+ return $this->curStructure[$this->curSourceField][$param_name];
+ }
+
+ function getCreatedCount($field_name)
+ {
+ $ret = $this->scanTable('/^l[\d]+_'.preg_quote($field_name, '/').'/');
+ if (!$ret) {
+ // no multilingual fields at all (but we have such field without language prefix)
+ $original_found = $this->scanTable('/'.preg_quote($field_name, '/').'/');
+ $this->curSourceField = $original_found ? $field_name : false;
+ }
+ else {
+ $this->curSourceField = 'l1_'.$field_name;
+ }
+ return $ret;
+ }
+ /**
+ * Returns ALTER statement part for adding required fields to table
+ *
+ * @param string $field_mask sql mask for creating field with correct definition (type & size)
+ * @param int $start_index add new fields starting from this index
+ * @param int $create_count create this much new multilingual field translations
+ * @return string
+ */
+ function generateAlterSQL($field_mask, $start_index, $create_count)
+ {
+ static $single_lang = null;
+ if (!isset($single_lang)) {
+ // if single language mode, then create indexes only on primary columns
+ $table_name = $this->Application->getUnitOption('lang', 'TableName');
+ $sql = 'SELECT COUNT(*)
+ FROM '.$table_name.'
+ WHERE Enabled = 1';
+ // if language count = 0, then assume it's multi language mode
+ $single_lang = $this->Conn->GetOne($sql) == 1;
+ }
+
+ $ret = ' ';
+ $i_count = $start_index + $create_count;
+ while ($start_index < $i_count) {
+ list($prev_field,$type) = explode(' ', sprintf($field_mask, $start_index - 1) );
+ if (substr($prev_field, 0, 3) == 'l0_') {
+ $prev_field = substr($prev_field, 3, strlen($prev_field));
+ if (!$this->curSourceField) {
+ // get field name before this one
+ $fields = array_keys($this->curFields);
+ $prev_field = $fields[array_search($prev_field, $fields) - 1];
+ if (getArrayValue($this->curFields[$prev_field], 'formatter') == 'kMultiLanguage') {
+ $prev_field = 'l'.$this->languageCount.'_'.$prev_field;
+ }
+ }
+ }
+
+ $field_expression = sprintf($field_mask, $start_index);
+ $ret .= 'ADD COLUMN '.$field_expression.' AFTER `'.$prev_field.'`, ';
+
+ if ($this->curIndexCount < 32 && ($start_index == $this->Application->GetDefaultLanguageId() || !$single_lang)) {
+ // create index for primary language column + for all others (if multiple languages installed)
+ list($field_name, $field_params) = explode(' ', $field_expression, 2);
+ $ret .= 'ADD INDEX (`'.$field_name.'` (5) ), ';
+ $this->curIndexCount++;
+ }
+
+ $start_index++;
+ }
+ return preg_replace('/, $/',';',$ret);
+ }
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/units/general/helpers/multilanguage.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/units/category_items/category_items_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/units/category_items/category_items_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/units/category_items/category_items_event_handler.php (revision 5521)
@@ -0,0 +1,113 @@
+<?php
+
+ class CategoryItemsEventHander extends InpDBEventHandler
+ {
+ /**
+ * Set's new category as primary for product
+ *
+ * @param kEvent $event
+ */
+ function OnSetPrimary(&$event)
+ {
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ $this->StoreSelectedIDs($event);
+ $ids=$this->getSelectedIDs($event);
+ if($ids)
+ {
+ $id = array_shift($ids);
+ $table_info = $object->getLinkedInfo();
+
+ $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+ $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (CategoryId = '.$id.')');
+ }
+ $event->redirect_params = Array('opener' => 's', 'pass_events' => true); //stay!
+ }
+
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ */
+ function customProcessing(&$event, $type)
+ {
+ if($event->Name == 'OnMassDelete')
+ {
+ $object =& $event->getObject();
+ $table_info = $object->getLinkedInfo();
+
+ switch ($type)
+ {
+ case 'before':
+ $ids = $event->getEventParam('ids');
+ if($ids)
+ {
+ $ids = $this->Conn->GetCol('SELECT CategoryId FROM '.$object->TableName.' WHERE (PrimaryCat=0) AND ('.$table_info['ForeignKey'].'='.$table_info['ParentId'].') AND CategoryId IN ('.implode(',',$ids).')');
+ $event->setEventParam('ids',$ids);
+ }
+ break;
+
+ // not needed because 'before' does not allow to delete primary cat!
+ /*case 'after':
+ // set 1st not deleted category as primary
+ $has_primary = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$object->TableName.' WHERE (PrimaryCat=1) AND ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].')');
+ if(!$has_primary)
+ {
+ $cat_id = $this->Conn->GetOne('SELECT CategoryId FROM '.$object->TableName.' WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+ $this->Conn->Query('UPDATE '.$object->TableName.' SET PrimaryCat = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (CategoryId = '.$cat_id.')');
+ }
+ break;*/
+ }
+ }
+ }
+
+ /**
+ * Removes primary mark from cloned category items record
+ *
+ * @param kEvent $event
+ */
+ function OnAfterClone(&$event)
+ {
+ $id = $event->getEventParam('id');
+ $table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
+ $sql = 'UPDATE %s SET PrimaryCat = 0 WHERE %s = %s';
+
+ $this->Conn->Query( sprintf($sql, $table, $id_field, $id) );
+ }
+
+ /**
+ * Deletes items of requested type from requested categories.
+ * In case if item is deleted from it's last category, then delete item too.
+ *
+ * @param kEvent $event
+ */
+ function OnDeleteFromCategory(&$event)
+ {
+ $category_ids = $event->getEventParam('category_ids');
+ if(!$category_ids) return false;
+
+ $item_prefix = $event->getEventParam('item_prefix');
+ $item =& $this->Application->recallObject($item_prefix.'.-item', null, Array('skip_autoload' => true));
+
+ $ci_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $item_table = $this->Application->getUnitOption($item_prefix, 'TableName');
+
+ $sql = 'SELECT ItemResourceId, CategoryId FROM %1$s INNER JOIN %2$s ON (%1$s.ResourceId = %2$s.ItemResourceId) WHERE CategoryId IN (%3$s)';
+ $category_items = $this->Conn->Query( sprintf($sql, $item_table, $ci_table, implode(',', $category_ids) ) );
+
+ $item_hash = Array();
+ foreach($category_items as $ci_row)
+ {
+ $item_hash[ $ci_row['ItemResourceId'] ][] = $ci_row['CategoryId'];
+ }
+
+ foreach($item_hash as $item_resource_id => $delete_category_ids)
+ {
+ $item->Load($item_resource_id, 'ResourceId');
+ $item->DeleteFromCategories($delete_category_ids);
+ }
+ }
+
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/units/category_items/category_items_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/incs/custom_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.7.2/core/admin_templates/incs/custom_blocks.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.7.2/core/admin_templates/incs/custom_blocks.tpl (revision 5521)
@@ -0,0 +1,67 @@
+<inp2:m_DefineElement name="config_edit_text">
+ <input type="text" name="<inp2:CustomInputName/>" value="<inp2:Field field="$field"/>" />
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_password">
+ <input type="password" primarytype="password" name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>" value="" />
+ <input type="password" name="verify_<inp2:CustomInputName/>" id="verify_<inp2:CustomInputName/>" value="" />
+ &nbsp;<span class="error" id="error_<inp2:CustomInputName/>"></span>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_option">
+ <option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_select">
+ <select name="<inp2:CustomInputName/>">
+ <inp2:PredefinedOptions field="$field" tabindex="$pass_tabindex" block="config_edit_option" selected="selected"/>
+ </select>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_checkbox">
+ <input type="hidden" id="<inp2:CustomInputName/>" name="<inp2:CustomInputName/>" value="<inp2:Field field="$field" db="db"/>">
+ <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:Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:CustomInputName/>'))">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_textarea">
+ <textarea name="<inp2:CustomInputName/>" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_radio_item">
+ <input type="radio" <inp2:m_param name="checked"/> name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:CustomInputName/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_radio">
+ <inp2:PredefinedOptions field="$field" tabindex="$pass_tabindex" block="config_radio_item" selected="checked"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="cv_row_block">
+ <inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
+ <tr class="subsectiontitle">
+ <td colspan="5">
+ <inp2:Field name="Heading" as_label="1"/>
+ </td>
+ </tr>
+ </inp2:m_if>
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>" >
+ <inp2:m_ParseBlock name="grid_data_label_ml_td" grid="$grid" SourcePrefix="$SourcePrefix" value_field="$value_field" ElementTypeField="ElementType" field="Prompt" PrefixSpecial="$PrefixSpecial"/>
+ <td valign="top" class="text">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+ <td class="error">&nbsp;</td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="edit_custom_td">
+ <td valign="top" class="text">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+</inp2:m_DefineElement>
+
+<!--<inp2:m_DefineElement name="edit_custom_td">
+ <td valign="top" class="text">
+ <input type="hidden" name="<inp2:InputName field="ResourceId"/>" id="<inp2:InputName field="ResourceId"/>" value="<inp2:Field field="ResourceId" grid="$grid"/>">
+ <input type="hidden" name="<inp2:InputName field="CustomDataId"/>" id="<inp2:InputName field="CustomDataId"/>" value="<inp2:Field field="CustomDataId" grid="$grid"/>">
+ <inp2:ConfigFormElement field="Value" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList" />
+ </td>
+</inp2:m_DefineElement>-->
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.7.2/core/admin_templates/incs/custom_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline