Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Sep 25, 12:08 AM

in-portal

Index: branches/unlabeled/unlabeled-1.2.2/kernel/units/custom_fields/custom_fields_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/kernel/units/custom_fields/custom_fields_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/units/custom_fields/custom_fields_tag_processor.php (revision 4332)
@@ -0,0 +1,73 @@
+<?php
+
+ class CustomFieldsTagProcessor extends kDBTagProcessor {
+
+ function CustomField($params)
+ {
+ $object =& $this->getObject($params);
+ $parent_item =& $this->Application->recallObject($params['SourcePrefix']);
+
+ $field = $this->SelectParam($params, 'name,field');
+ return $parent_item->GetField('cust_'.$object->GetField($field));
+ }
+
+ function CustomInputName($params)
+ {
+ $object =& $this->getObject($params);
+ $source_prefix = $this->Application->Parser->GetParam('SourcePrefix');
+
+ $source_tp =& $this->Application->recallTagProcessor($source_prefix);
+ $params['name'] = 'cust_'.$object->GetDBField('FieldName');
+ return $source_tp->InputName($params);
+ }
+
+ /**
+ * Prints list content using block specified
+ *
+ * @param Array $params
+ * @return string
+ * @access public
+ */
+ function PrintList($params)
+ {
+ $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 = '';
+ $source_prefix = getArrayValue($params, 'SourcePrefix');
+ if ($source_prefix) {
+ $source_object =& $this->Application->recallObject($source_prefix);
+ }
+
+ 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')));
+ $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.2.2/kernel/units/custom_fields/custom_fields_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/kernel/units/reviews/reviews_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/kernel/units/reviews/reviews_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/units/reviews/reviews_tag_processor.php (revision 4332)
@@ -0,0 +1,98 @@
+<?php
+
+class ReviewsTagProcessor extends kDBTagProcessor
+{
+
+
+ /**
+ * Returns a link for editing product
+ *
+ * @param Array $params
+ * @return string
+ */
+ function ItemEditLink($params)
+ {
+ $item_prefix = $params['item_prefix'];
+ $id_field = $this->Application->getUnitOption($item_prefix,'IDField');
+
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+ $item_id = $object->GetDBField($id_field);
+
+ return $this->Application->HREF($params['edit_template'],'', Array(
+ 'm_opener' => 'd',
+ $item_prefix.'_mode' => 't',
+ $item_prefix.'_event' => 'OnEdit',
+ $item_prefix.'_id' => $item_id,
+ 'pass' => 'all,'.$item_prefix
+ ), 'index4.php');
+ }
+
+ /**
+ * Get's reuested field value
+ *
+ * @param Array $params
+ * @return string
+ * @access public
+ */
+ function Field($params)
+ {
+ $field = $this->SelectParam($params, 'name,field');
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+
+ if ($field == 'ReviewText') {
+ if ($object->GetDBField('TextFormat') == 1) {
+ $params['no_special'] = 'no_special';
+ }
+ else {
+ unset($params['no_special']);
+ }
+ }
+
+ return parent::Field($params);
+
+ }
+
+ function AlreadyReviewed($params)
+ {
+ $user_id = ($this->Application->GetVar('u_id') == 0) ? -2 : $this->Application->GetVar('u_id');
+ $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ $product_info = $object->getLinkedInfo();
+
+ $sql = ' SELECT * FROM '.TABLE_PREFIX.'SpamControl
+ WHERE ItemResourceId='.$product_info['ParentId'].'
+ AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
+ AND PortalUserId='.$user_id.'
+ AND DataType="Review"';
+ $res = $this->Conn->GetRow($sql);
+ if($res['Expire'] > adodb_mktime())
+ {
+ $ret = 1;
+ }
+ else
+ {
+ $sql = 'DELETE FROM '.TABLE_PREFIX.'SpamControl
+ WHERE ItemResourceId='.$product_info['ParentId'].'
+ AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
+ AND PortalUserId='.$user_id.'
+ AND DataType="Review"';
+ $this->Conn->Query($sql);
+ $ret = 0;
+ }
+ return $ret;
+ }
+
+ function HasError($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if (method_exists($object, 'GetErrorMsg')) {
+ return parent::HasError($params);
+ }
+ else {
+ return 0;
+ }
+ }
+}
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/kernel/units/reviews/reviews_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/incs/export.js
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/incs/export.js (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/incs/export.js (revision 4332)
@@ -0,0 +1,85 @@
+var $http_request = getXMLHTTPObject();
+var $last_responce = new Date();
+
+function formatNumber($number, $digits_count)
+{
+ return parseInt($number) < Math.pow(10, $digits_count - 1) ? str_repeat('0', $digits_count - 1) + $number : $number;
+}
+
+function formatDate($date)
+{
+ var $hour = formatNumber($date.getHours(), 2);
+ var $minute = formatNumber($date.getMinutes(), 2);
+ var $second = formatNumber($date.getSeconds(), 2);
+ return $hour + ':' + $minute + ':' + $second;
+}
+
+function getSeconds($from_date, $to_date)
+{
+ var $from_seconds = $from_date.getSeconds() + $from_date.getMinutes() * 60 + $from_date.getHours() * 3600;
+ var $to_seconds = $to_date.getSeconds() + $to_date.getMinutes() * 60 + $to_date.getHours() * 3600;
+ return $to_seconds - $from_seconds;
+}
+
+var $aborting = false;
+function queryProgress($url, $responce_func)
+{
+// alert('queryProgress');
+ if ($http_request && $http_request.readyState != 0) {
+// alert('aborting');
+ $aborting = true;
+ $http_request.abort();
+// alert('After Abort: readyState: '+$http_request.readyState+' status: '+$http_request.status);
+ $aborting = false;
+ }
+
+// alert('opening');
+ $http_request.open('POST', $url, true);
+ $http_request.setRequestHeader("referer", $url);
+ $http_request.onreadystatechange = function() { processExportResponce($url, $responce_func); };
+// alert('sending new req');
+ $http_request.send('is_xml=1');
+ $last_responce = new Date();
+}
+
+function setProgress($percent)
+{
+ $percent = parseInt($percent);
+ document.getElementById('percent_done').style.width = $percent + '%';
+ document.getElementById('percent_left').style.width = (100 - $percent) + '%';
+ document.getElementById('progress_display').innerHTML = $percent;
+ document.getElementById('progress_time').innerHTML = '[' + $phrase_LastResponce + ': ' + formatDate($last_responce) + ']';
+}
+
+function processExportResponce($url, $responce_func)
+{
+// alert('processExportResponce ready: '+$http_request.readyState);
+ if ($aborting) return;
+ if ($http_request.readyState == 4) {
+ if ($http_request.status == 200) {
+// alert('readyState: '+$http_request.readyState+' status: '+$http_request.status);
+ var $progress = parseFloat($http_request.responseText);
+ if ($progress) {
+ setProgress($progress);
+ if ($progress < 100) {
+ // proceed to next import step
+ //alert('ANOTHER abort');
+ //$http_request.abort();
+ //alert('After ANOTHER Abort: readyState: '+$http_request.readyState+' status: '+$http_request.status);
+ setTimeout( function() {
+// alert('quering after timeout');
+ queryProgress($url, $responce_func);
+ }, 500)
+ }
+ else {
+ // proceed to finish screen
+ window.location.href = $finish_template;
+ }
+ }
+ else {
+// alert('progress: '+$progress+' ('+$http_request.responseText+')');
+ alert($phrase_ResponceError);
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/incs/export.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/units/custom_fields/custom_fields_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/units/custom_fields/custom_fields_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/core/units/custom_fields/custom_fields_tag_processor.php (revision 4332)
@@ -0,0 +1,73 @@
+<?php
+
+ class CustomFieldsTagProcessor extends kDBTagProcessor {
+
+ function CustomField($params)
+ {
+ $object =& $this->getObject($params);
+ $parent_item =& $this->Application->recallObject($params['SourcePrefix']);
+
+ $field = $this->SelectParam($params, 'name,field');
+ return $parent_item->GetField('cust_'.$object->GetField($field));
+ }
+
+ function CustomInputName($params)
+ {
+ $object =& $this->getObject($params);
+ $source_prefix = $this->Application->Parser->GetParam('SourcePrefix');
+
+ $source_tp =& $this->Application->recallTagProcessor($source_prefix);
+ $params['name'] = 'cust_'.$object->GetDBField('FieldName');
+ return $source_tp->InputName($params);
+ }
+
+ /**
+ * Prints list content using block specified
+ *
+ * @param Array $params
+ * @return string
+ * @access public
+ */
+ function PrintList($params)
+ {
+ $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 = '';
+ $source_prefix = getArrayValue($params, 'SourcePrefix');
+ if ($source_prefix) {
+ $source_object =& $this->Application->recallObject($source_prefix);
+ }
+
+ 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')));
+ $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.2.2/core/units/custom_fields/custom_fields_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/units/reviews/reviews_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/units/reviews/reviews_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/core/units/reviews/reviews_tag_processor.php (revision 4332)
@@ -0,0 +1,98 @@
+<?php
+
+class ReviewsTagProcessor extends kDBTagProcessor
+{
+
+
+ /**
+ * Returns a link for editing product
+ *
+ * @param Array $params
+ * @return string
+ */
+ function ItemEditLink($params)
+ {
+ $item_prefix = $params['item_prefix'];
+ $id_field = $this->Application->getUnitOption($item_prefix,'IDField');
+
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+ $item_id = $object->GetDBField($id_field);
+
+ return $this->Application->HREF($params['edit_template'],'', Array(
+ 'm_opener' => 'd',
+ $item_prefix.'_mode' => 't',
+ $item_prefix.'_event' => 'OnEdit',
+ $item_prefix.'_id' => $item_id,
+ 'pass' => 'all,'.$item_prefix
+ ), 'index4.php');
+ }
+
+ /**
+ * Get's reuested field value
+ *
+ * @param Array $params
+ * @return string
+ * @access public
+ */
+ function Field($params)
+ {
+ $field = $this->SelectParam($params, 'name,field');
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+
+ if ($field == 'ReviewText') {
+ if ($object->GetDBField('TextFormat') == 1) {
+ $params['no_special'] = 'no_special';
+ }
+ else {
+ unset($params['no_special']);
+ }
+ }
+
+ return parent::Field($params);
+
+ }
+
+ function AlreadyReviewed($params)
+ {
+ $user_id = ($this->Application->GetVar('u_id') == 0) ? -2 : $this->Application->GetVar('u_id');
+ $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ $product_info = $object->getLinkedInfo();
+
+ $sql = ' SELECT * FROM '.TABLE_PREFIX.'SpamControl
+ WHERE ItemResourceId='.$product_info['ParentId'].'
+ AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
+ AND PortalUserId='.$user_id.'
+ AND DataType="Review"';
+ $res = $this->Conn->GetRow($sql);
+ if($res['Expire'] > adodb_mktime())
+ {
+ $ret = 1;
+ }
+ else
+ {
+ $sql = 'DELETE FROM '.TABLE_PREFIX.'SpamControl
+ WHERE ItemResourceId='.$product_info['ParentId'].'
+ AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
+ AND PortalUserId='.$user_id.'
+ AND DataType="Review"';
+ $this->Conn->Query($sql);
+ $ret = 0;
+ }
+ return $ret;
+ }
+
+ function HasError($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if (method_exists($object, 'GetErrorMsg')) {
+ return parent::HasError($params);
+ }
+ else {
+ return 0;
+ }
+ }
+}
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/core/units/reviews/reviews_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/core/units/images/images_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/core/units/images/images_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/core/units/images/images_config.php (revision 4332)
@@ -0,0 +1,160 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'img',
+ 'Clones' => Array(
+ 'l-img' => Array('ParentPrefix' => 'l'),
+ 'n-img' => Array('ParentPrefix' => 'n'),
+ 'bb-img'=> Array('ParentPrefix' => 'bb'),
+ /*'p-img' => Array('ParentPrefix' => 'p'),*/
+
+ 'catimg' => Array(
+ 'ParentPrefix' => 'c',
+ 'AggregateTags' => Array(
+ Array(
+ 'AggregateTo' => 'c',
+ 'AggregatedTagName' => 'Image',
+ 'LocalTagName' => 'ItemImage',
+ ),
+ Array(
+ 'AggregateTo' => 'c',
+ 'AggregatedTagName' => 'ListImages',
+ 'LocalTagName' => 'PrintList2',
+ 'LocalSpecial' => 'list',
+ ),
+ Array(
+ 'AggregateTo' => 'c',
+ 'AggregatedTagName' => 'LargeImageExists',
+ 'LocalTagName' => 'LargeImageExists',
+ ),
+ ),
+ )
+ ),
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'ImageEventHandler','file'=>'image_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'ImageTagProcessor','file'=>'image_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'hooks' => Array(),
+ 'AggregateTags' => Array(
+ Array(
+ 'AggregateTo' => 'p',
+ 'AggregatedTagName' => 'Image',
+ 'LocalTagName' => 'ItemImage',
+ ),
+ Array(
+ 'AggregateTo' => 'p',
+ 'AggregatedTagName' => 'ListImages',
+ 'LocalTagName' => 'PrintList2',
+ 'LocalSpecial' => 'list',
+ ),
+ Array(
+ 'AggregateTo' => 'p',
+ 'AggregatedTagName' => 'LargeImageExists',
+ 'LocalTagName' => 'LargeImageExists',
+ ),
+
+ ),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ ),
+ 'IDField' => 'ImageId',
+ 'StatusField' => Array('Enabled', 'DefaultImg'), // field, that is affected by Approve/Decline events
+ 'TitleField' => 'Name', // field, used in bluebar when editing existing item
+ 'TableName' => TABLE_PREFIX.'Images',
+ 'ParentTableKey'=> 'ResourceId', // linked field in master table
+ 'ForeignKey' => 'ResourceId', // linked field in subtable
+ 'ParentPrefix' => 'p',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'FilterMenu' => Array(
+ 'Groups' => Array(
+ Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
+ ),
+ 'Filters' => Array(
+ 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
+ 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
+ )
+ ),
+
+ 'CalculatedFields' => Array(
+ '' => Array(
+ 'Preview' => '0',
+ ),
+ ),
+
+ 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ ), // key - special, value - list select sql
+ 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ ),
+ 'ListSortings' => Array(
+ '' => Array(
+ 'ForcedSorting' => Array('Priority' => 'desc'),
+ 'Sorting' => Array('Name' => 'asc'),
+ )
+ ),
+ 'Fields' => Array(
+ 'ImageId' => Array('type'=>'int'),
+ 'ResourceId' => Array('type'=>'int', 'not_null'=>1, 'default' => 0),
+ 'Url' => Array('max_len'=>255, 'default' => '', 'not_null'=>1),
+ 'Name' => Array('max_len'=>255, 'required'=>1, 'not_null'=>1, 'default' => ''),
+ 'AltName' => Array('max_len'=>255, 'required'=>1, 'not_null'=>1),
+ 'ImageIndex' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
+ 'LocalImage' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
+ 'LocalPath' => Array('formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len'=>240, 'default' => '', 'not_null' => 1, 'include_path' => 1,
+ 'allowed_types' => Array(
+ 0 => 'image/jpeg',
+ 1 => 'image/pjpeg',
+ 2 => 'image/png',
+ 3 => 'image/gif',
+ 4 => 'image/bmp'
+ ),
+ 'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
+ 'bad_file_size' => '!la_error_FileTooLarge!',
+ 'cant_save_file' => '!la_error_cant_save_file!'
+ )
+ ),
+ 'Enabled' => Array('formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null'=>1),
+ 'DefaultImg' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
+ 'ThumbUrl' => Array('max_len' => 255),
+ 'Priority' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
+ 'ThumbPath' => Array( 'formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len' => 255,
+ 'allowed_types' => Array(
+ 0 => 'image/jpeg',
+ 1 => 'image/pjpeg',
+ 2 => 'image/png',
+ 3 => 'image/gif',
+ 4 => 'image/bmp'
+ ),
+ 'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
+ 'bad_file_size' => '!la_error_FileTooLarge!',
+ 'cant_save_file' => '!la_error_cant_save_file!'
+ )
+ ),
+ 'LocalThumb' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
+ 'SameImages' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
+ ),
+ 'VirtualFields' => Array(
+ 'Preview' => Array(),
+ 'ImageUrl' => Array(),
+ ),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon17_custom.gif','1_0'=>'icon16_image.gif','0_0'=>'icon16_image_disabled.gif','1_1'=>'icon16_image_primary.gif'),
+ 'Fields' => Array(
+ 'Name' => Array( 'title'=>'la_col_ImageName' , 'data_block' => 'image_caption_td'),
+ 'AltName' => Array( 'title'=>'la_col_AltName' ),
+ 'Url' => Array( 'title'=>'la_col_ImageUrl', 'data_block' => 'image_url_td' ),
+ 'Enabled' => Array( 'title'=>'la_col_ImageEnabled' ),
+ 'Preview' => Array( 'title'=>'la_col_Preview', 'data_block' => 'image_preview_td' ),
+ ),
+
+ ),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/core/units/images/images_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/admin/index4_direct.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/admin/index4_direct.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/admin/index4_direct.php (revision 4332)
@@ -0,0 +1,43 @@
+<?php
+##############################################################
+##In-portal ##
+##############################################################
+## In-portal ##
+## Intechnic Corporation ##
+## All Rights Reserved, 1998-2002 ##
+## ##
+## No portion of this code may be copied, reproduced or ##
+## otherwise redistributed without proper written ##
+## consent of Intechnic Corporation. Violation will ##
+## result in revocation of the license and support ##
+## privileges along maximum prosecution allowed by law. ##
+##############################################################
+
+ // new startup: begin
+ define('REL_PATH', 'admin');
+ $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
+
+ $prefix = $application->GetVar('prefix');
+ $application->SetVar($prefix.'_mode', 't');
+
+ $id_field = $application->getUnitOption($prefix, 'IDField');
+ $temp_handler =& $application->recallObject($prefix.'_TempHandler', 'kTempTablesHandler');
+ $table_name = $temp_handler->GetTempName( $application->getUnitOption($prefix, 'TableName') );
+
+ $db =& $application->GetADODBConnection();
+ $item_id = $db->GetOne('SELECT '.$id_field.' FROM '.$table_name, (int)$application->GetVar('en'));
+ $application->SetVar($prefix.'_id', $item_id);
+
+ $object =& $application->recallObject($prefix, null, Array('skip_autoload' => true));
+ $object->Load($item_id);
+
+ $template = $application->GetVar('t');
+ include_once FULL_PATH.'/admin/'.$template.'.php';
+
+ $application->Run();
+
+ int_footer();
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/admin/index4_direct.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.2/compat.php
===================================================================
--- branches/unlabeled/unlabeled-1.2.2/compat.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.2.2/compat.php (revision 4332)
@@ -0,0 +1,18 @@
+<?php
+ $dir = FULL_PATH.'/compat/';
+
+ if (is_dir($dir))
+ {
+ if ($dh = opendir($dir))
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ if($file != "." && $file != ".." && substr($file,-3)=="php")
+ {
+ require_once($dir.$file);
+ }
+ }
+ closedir($dh);
+ }
+ }
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.2.2/compat.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline