Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Sep 18, 12:38 AM

in-portal

Index: branches/unlabeled/unlabeled-1.9.2/kernel/units/categories/categories_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/kernel/units/categories/categories_item.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/kernel/units/categories/categories_item.php (revision 5450)
@@ -0,0 +1,143 @@
+<?php
+
+ class CategoriesItem extends kDBItem
+ {
+ function Create($force_id=false, $system_create=false)
+ {
+ if (!$this->Validate()) return false;
+
+ $this->SetDBField('ResourceId', $this->Application->NextResourceId());
+ $this->SetDBField('CreatedById', $this->Application->GetVar('u_id') );
+ $this->SetDBField('CreatedOn_date', adodb_mktime() );
+ $this->SetDBField('CreatedOn_time', adodb_mktime() );
+
+ $this->checkFilename();
+ $this->generateFilename();
+
+ $this->SetDBField('ParentId', $this->Application->GetVar('m_cat_id') );
+ $ret = parent::Create($force_id, $system_create);
+ if ($ret) {
+ $sql = 'UPDATE %s SET ParentPath = %s WHERE CategoryId = %s';
+ $parent_path = $this->buildParentPath();
+ $this->Conn->Query( sprintf($sql, $this->TableName, $this->Conn->qstr($parent_path), $this->GetID() ) );
+
+ $this->SetDBField('ParentPath', $parent_path);
+ }
+ return $ret;
+
+ }
+
+ function Update($id=null, $system_update=false)
+ {
+ $this->checkFilename();
+ $this->generateFilename();
+
+ $ret = parent::Update($id, $system_update);
+ return $ret;
+ }
+
+ function buildParentPath()
+ {
+ $parent_id = $this->GetDBField('ParentId');
+
+ if ($parent_id == 0) {
+ $parent_path = '|';
+ }
+ else {
+ $cat_table = $this->Application->getUnitOption($this->Prefix, 'TableName');
+ $sql = 'SELECT ParentPath FROM '.$cat_table.' WHERE CategoryId = %s';
+ $parent_path = $this->Conn->GetOne( sprintf($sql, $parent_id) );
+ }
+
+ return $parent_path.$this->GetID().'|';
+ }
+
+ /**
+ * replace not allowed symbols with "_" chars + remove duplicate "_" chars in result
+ *
+ * @param string $string
+ * @return string
+ */
+ function stripDisallowed($string)
+ {
+ $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', '`',
+ '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', '~',
+ '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ',');
+
+ $string = str_replace($not_allowed, '_', $string);
+ $string = preg_replace('/(_+)/', '_', $string);
+ $string = $this->checkAutoFilename($string);
+
+ return $string;
+ }
+
+ function checkFilename()
+ {
+ if( !$this->GetDBField('AutomaticFilename') )
+ {
+ $filename = $this->GetDBField('Filename');
+ $this->SetDBField('Filename', $this->stripDisallowed($filename) );
+ }
+ }
+
+ function checkAutoFilename($filename)
+ {
+ if(!$filename) return $filename;
+
+ $item_id = !$this->GetID() ? 0 : $this->GetID();
+
+ // check temp table
+ $sql_temp = 'SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE Filename = '.$this->Conn->qstr($filename);
+ $found_temp_ids = $this->Conn->GetCol($sql_temp);
+
+ // check live table
+ $sql_live = 'SELECT '.$this->IDField.' FROM '.$this->Application->GetLiveName($this->TableName).' WHERE Filename = '.$this->Conn->qstr($filename);
+ $found_live_ids = $this->Conn->GetCol($sql_live);
+
+ $found_item_ids = array_unique( array_merge($found_temp_ids, $found_live_ids) );
+
+ $has_page = preg_match('/(.*)_([\d]+)([a-z]*)$/', $filename, $rets);
+
+ $duplicates_found = (count($found_item_ids) > 1) || ($found_item_ids && $found_item_ids[0] != $item_id);
+ if ($duplicates_found || $has_page) // other category has same filename as ours OR we have filename, that ends with _number
+ {
+ $append = $duplicates_found ? '_a' : '';
+ if($has_page)
+ {
+ $filename = $rets[1].'_'.$rets[2];
+ $append = $rets[3] ? $rets[3] : '_a';
+ }
+
+ // check live & temp table
+ $sql_temp = 'SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE (Filename = %s) AND ('.$this->IDField.' != '.$item_id.')';
+ $sql_live = 'SELECT '.$this->IDField.' FROM '.$this->Application->GetLiveName($this->TableName).' WHERE (Filename = %s) AND ('.$this->IDField.' != '.$item_id.')';
+ while ( $this->Conn->GetOne( sprintf($sql_temp, $this->Conn->qstr($filename.$append)) ) > 0 ||
+ $this->Conn->GetOne( sprintf($sql_live, $this->Conn->qstr($filename.$append)) ) > 0 )
+ {
+ if (substr($append, -1) == 'z') $append .= 'a';
+ $append = substr($append, 0, strlen($append) - 1) . chr( ord( substr($append, -1) ) + 1 );
+ }
+
+ return $filename.$append;
+ }
+
+ return $filename;
+ }
+
+ /**
+ * Generate item's filename based on it's title field value
+ *
+ * @return string
+ */
+ function generateFilename()
+ {
+ if ( !$this->GetDBField('AutomaticFilename') && $this->GetDBField('Filename') ) return false;
+
+ $title_field = $this->Application->getUnitOption($this->Prefix, 'TitleField');
+ $name = $this->stripDisallowed( $this->GetDBField($title_field) );
+
+ if ( $name != $this->GetDBField('Filename') ) $this->SetDBField('Filename', $name);
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/kernel/units/categories/categories_item.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/kernel/units/phrases/phrases_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/kernel/units/phrases/phrases_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/kernel/units/phrases/phrases_event_handler.php (revision 5450)
@@ -0,0 +1,78 @@
+<?php
+
+ class PhrasesEventHandler extends InpDBEventHandler
+ {
+ /**
+ * Forces new label in case if issued from get link
+ *
+ * @param kEvent $event
+ */
+ function OnNew(&$event)
+ {
+ parent::OnNew($event);
+ $label = $this->Application->GetVar('phrases_label');
+
+ $object =& $event->getObject( $label ? Array('live_table'=>true, 'skip_autoload' => true) : Array('skip_autoload' => true) );
+ if ($label) {
+ $object->SetDBField('Phrase',$label);
+ $object->SetDBField('LanguageId', $this->Application->GetVar('m_lang') );
+ $object->SetDBField('PhraseType',1);
+
+ $primary_language = $this->Application->GetDefaultLanguageId();
+ $live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $sql = 'SELECT Translation FROM %s WHERE Phrase = %s';
+ $primary_value = $this->Conn->GetOne( sprintf($sql, $live_table, $this->Conn->qstr($label) ) );
+ $object->SetDBField('PrimaryTranslation', $primary_value);
+ }
+
+ $last_module = $this->Application->GetVar('last_module');
+ if($last_module) $object->SetDBField('Module', $last_module);
+
+ if($event->Special == 'export' || $event->Special == 'import')
+ {
+ $object->SetDBField('PhraseType', '|0|1|2|');
+ $modules = $this->Conn->GetCol('SELECT Name FROM '.TABLE_PREFIX.'Modules');
+ $object->SetDBField('Module', '|'.implode('|', $modules).'|' );
+ }
+ }
+
+ /**
+ * Forces create to use live table
+ *
+ * @param kEvent $event
+ */
+ function OnBeforePhraseCreate(&$event)
+ {
+ $edit_direct = $this->Application->GetVar($event->Prefix.'_label');
+ if ($edit_direct) {
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ if ($this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id')) {
+ $object->SwitchToLive();
+ }
+ }
+ }
+
+ /**
+ * Save phrase change date & ip translation was made from
+ *
+ * @param kEvent $event
+ */
+ function OnSetLastUpdated(&$event)
+ {
+ $object =& $event->getObject();
+ $prev_translation = $this->Conn->GetOne('SELECT Translation FROM '.$object->TableName.' WHERE '.$object->IDField.' = '.(int)$object->GetId() );
+ if( $prev_translation != $object->GetDBField('Translation') )
+ {
+ $ip_address = getenv('HTTP_X_FORWARDED_FOR') ? getenv('HTTP_X_FORWARDED_FOR') : getenv('REMOTE_ADDR');
+ $object->SetDBField('LastChanged_date', adodb_mktime() );
+ $object->SetDBField('LastChanged_time', adodb_mktime() );
+ $object->SetDBField('LastChangeIP', $ip_address);
+ }
+
+ $cookie_path = $this->Application->IsAdmin() ? BASE_PATH.'/admin' : BASE_PATH;
+ setcookie('last_module', $object->GetDBField('Module'), $cookie_path, '.'.SERVER_NAME);
+ }
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/kernel/units/phrases/phrases_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/kernel/units/stylesheets/stylesheets_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/kernel/units/stylesheets/stylesheets_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/kernel/units/stylesheets/stylesheets_config.php (revision 5450)
@@ -0,0 +1,129 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'css',
+ 'ItemClass' => Array('class'=>'StylesheetsItem','file'=>'stylesheets_item.php','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'StylesheetsEventHandler','file'=>'stylesheets_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'css',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array('OnSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnCompileStylesheet',
+ ),
+ ),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+ 'IDField' => 'StylesheetId',
+
+ 'StatusField' => Array('Enabled'),
+
+ 'TitleField' => 'Name',
+
+ 'TitlePresets' => Array(
+ 'default' => Array( 'new_status_labels' => Array('css'=>'!la_title_Adding_Stylesheet!'),
+ 'edit_status_labels' => Array('css'=>'!la_title_Editing_Stylesheet!'),
+ 'new_titlefield' => Array('css'=>'!la_title_New_Stylesheet!'),
+ ),
+
+ 'styles_list' => Array('prefixes' => Array('css_List'), 'format' => "!la_title_Stylesheets! (#css_recordcount#)"),
+
+ 'stylesheets_edit' => Array('prefixes' => Array('css'), 'format' => "#css_status# '#css_titlefield#' - !la_title_General!"),
+
+ 'base_styles' => Array('prefixes' => Array('css','selectors.base_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BaseStyles! (#selectors.base_recordcount#)"),
+
+ 'block_styles' => Array('prefixes' => Array('css','selectors.block_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BlockStyles! (#selectors.block_recordcount#)"),
+
+ 'base_style_edit' => Array( 'prefixes' => Array('css','selectors'),
+ 'new_status_labels' => Array('selectors'=>'!la_title_Adding_BaseStyle!'),
+ 'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BaseStyle!'),
+ 'new_titlefield' => Array('selectors'=>'!la_title_New_BaseStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
+
+ 'block_style_edit' => Array( 'prefixes' => Array('css','selectors'),
+ 'new_status_labels' => Array('selectors'=>'!la_title_Adding_BlockStyle!'),
+ 'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BlockStyle!'),
+ 'new_titlefield' => Array('selectors'=>'!la_title_New_BlockStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
+
+ 'style_edit' => Array('prefixes' => Array('selectors'), 'format' => "!la_title_EditingStyle! '#selectors_titlefield#'"),
+ ),
+
+ 'PermSection' => Array('main' => 'in-portal:configure_styles'),
+
+ 'Sections' => Array(
+ 'in-portal:configure_styles' => Array(
+ 'parent' => 'in-portal:system',
+ 'icon' => 'style',
+ 'label' => 'la_tab_Stylesheets',
+ 'url' => Array('t' => 'stylesheets/stylesheets_list', 'pass' => 'm'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 4,
+ 'type' => stTREE,
+ ),
+
+ ),
+
+ 'TableName' => TABLE_PREFIX.'Stylesheets',
+ 'SubItems' => Array('selectorsbase', 'selectorsblock'),
+
+ 'FilterMenu' => Array(
+ 'Groups' => Array(
+ Array('mode' => 'AND', 'filters' => Array(0,1), 'type' => WHERE_FILTER),
+ ),
+
+ 'Filters' => Array(
+ 0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 1' ),
+ 1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 0' ),
+ )
+ ),
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ ), // key - special, value - list select sql
+ 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ ),
+ 'ListSortings' => Array(
+ '' => Array(
+ 'Sorting' => Array('Name' => 'asc'),
+ )
+ ),
+ 'Fields' => Array(
+ 'StylesheetId' => Array(),
+ 'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
+ 'Description' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'LastCompiled' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => '1','default' => '0'),
+ 'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1','default' => 0),
+ ),
+
+ 'VirtualFields' => Array(),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif',0=>'icon16_style_disabled.gif',1=>'icon16_style.gif'),
+ 'Fields' => Array(
+ 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td'),
+ 'Description' => Array( 'title'=>'la_col_Description', 'data_block' => 'grid_description_td' ),
+ 'Enabled' => Array( 'title'=>'la_col_Status' ),
+ 'LastCompiled' => Array('title' => 'la_col_LastCompiled'),
+ ),
+
+ ),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/kernel/units/stylesheets/stylesheets_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/kernel/units/general/inp_db_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/kernel/units/general/inp_db_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/kernel/units/general/inp_db_event_handler.php (revision 5450)
@@ -0,0 +1,123 @@
+<?php
+
+ class InpDBEventHandler extends kDBEventHandler
+ {
+
+ function mapEvents()
+ {
+ parent::mapEvents();
+ $common_events = Array( 'OnMassApprove'=>'iterateItems',
+ 'OnMassDecline'=>'iterateItems',
+ 'OnMassMoveUp'=>'iterateItems',
+ 'OnMassMoveDown'=>'iterateItems',
+ );
+
+ $this->eventMethods = array_merge($this->eventMethods, $common_events);
+ }
+
+ /**
+ * Apply same processing to each item beeing selected in grid
+ *
+ * @param kEvent $event
+ * @access private
+ */
+ function iterateItems(&$event)
+ {
+ if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+ return;
+ }
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ $this->StoreSelectedIDs($event);
+ $ids=$this->getSelectedIDs($event);
+
+ if($ids)
+ {
+ $status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+
+ foreach($ids as $id)
+ {
+ $object->Load($id);
+
+ switch ($event->Name)
+ {
+ case 'OnMassApprove':
+ $object->SetDBField($status_field, 1);
+ break;
+
+ case 'OnMassDecline':
+ $object->SetDBField($status_field, 0);
+ break;
+
+ case 'OnMassMoveUp':
+ $object->SetDBField('Priority', $object->GetDBField('Priority') + 1);
+ break;
+
+ case 'OnMassMoveDown':
+ $object->SetDBField('Priority', $object->GetDBField('Priority') - 1);
+ break;
+ }
+
+ if( $object->Update() )
+ {
+ $event->status=erSUCCESS;
+ $event->redirect_params = Array('opener' => 's', 'pass_events' => true); //stay!
+ }
+ else
+ {
+ $event->status=erFAIL;
+ $event->redirect=false;
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param kEvent $event
+ */
+ function OnMassClone(&$event)
+ {
+ if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+ return;
+ }
+
+ $event->status=erSUCCESS;
+
+ $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+
+ $this->StoreSelectedIDs($event);
+ $ids=$this->getSelectedIDs($event);
+
+ if($ids)
+ {
+ $temp->CloneItems($event->Prefix, $event->Special, $ids);
+ }
+ }
+
+ function check_array($records, $field, $value)
+ {
+ foreach ($records as $record)
+ {
+ if ($record[$field] == $value)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function OnPreSavePopup(&$event)
+ {
+ $object =& $event->getObject();
+ $this->RemoveRequiredFields($object);
+ $event->CallSubEvent('OnPreSave');
+
+ $this->finalizePopup($event);
+ }
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/kernel/units/general/inp_db_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/groups/permissions_selector.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/groups/permissions_selector.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/groups/permissions_selector.tpl (revision 5450)
@@ -0,0 +1,80 @@
+<inp2:m_RequireLogin permissions="in-portal:user_groups.advanced:manage_permissions" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+
+<inp2:m_ParseBlock name="section_header" prefix="g" icon="icon46_usergroups" module="in-portal" title="!la_title_Groups!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="g" title_preset="groups_edit_additional_permissions" module="in-portal" icon="icon46_usergroups"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ set_hidden_field('advanced_save', 1);
+ submit_event('g-perm','OnGroupSavePermissions');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ window.close();
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<inp2:g_SaveWarning name="grid_save_warning"/>
+
+<inp2:m_DefineElement name="permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_param name="section_name"/>.<inp2:m_param name="perm_name"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+
+<inp2:m_DefineElement name="old_permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_phrase name="$label"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:g-perm_LoadPermissions/>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_set {$PrefixSpecial}_sequence="1" odd_even="table_color1"/>
+
+ <tr class="subsectiontitle">
+ <td><inp2:m_phrase label="la_col_PermissionName"/></td>
+ <td><inp2:m_phrase label="la_col_PermissionValue"/></td>
+ </tr>
+ <inp2:m_if check="m_GetEquals" name="section_name" value="in-portal:root">
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="LOGIN" label="lu_PermName_Login_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="ADMIN" label="lu_PermName_Admin_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="SYSTEM_ACCESS.READONLY" label="la_PermName_SystemAccess.ReadOnly_desc"/>
+ <inp2:m_else/>
+ <inp2:adm_ListSectionPermissions render_as="permission_element" type="1"/>
+ </inp2:m_if>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/groups/permissions_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/config/config_search.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/config/config_search.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/config/config_search.tpl (revision 5450)
@@ -0,0 +1,133 @@
+<inp2:m_RequireLogin perm_event="confs:OnLoad" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_ParseBlock name="section_header" prefix="confs" icon="icon46_settings_search" title="!la_tab_ConfigSearch!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="confs" title_preset="config_list_search" icon="icon46_settings_output"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ var a_toolbar = new ToolBar();
+ <inp2:m_if check="m_IsDebugMode">
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewSearchConfig" escape="1"/>', function() {
+ std_new_item('confs', 'config/config_search_edit');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+ </inp2:m_if>
+
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('confs','<inp2:confs_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('confs','OnCancel');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="confs_checkbox_td">
+ <td valign="top" class="text">
+
+ <inp2:m_if check="m_ParamEquals" name="nolabel" value="true">
+ <inp2:m_else />
+ <label for="_cb_<inp2:InputName field="$Field"/>"><inp2:m_Phrase label="$Label" /></label>
+ </inp2:m_if>
+
+ <input type="checkbox" name="_cb_<inp2:InputName field="$Field"/>" <inp2:Field field="$Field" checked="checked" db="db"/> id="_cb_<inp2:InputName field="$Field"/>" onclick="update_checkbox(this, document.getElementById('<inp2:InputName field="$Field"/>'))" >
+ <input type="hidden" id="<inp2:InputName field="$Field"/>" name="<inp2:InputName field="$Field"/>" value="<inp2:Field field="$Field" db="db"/>">
+ </td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="confs_edit_text">
+ <td valign="top" class="text">
+ <label for="<inp2:InputName field="$Field"/>"><inp2:m_Phrase label="$Label" /></label>
+ <input type="text" name="<inp2:InputName field="$Field"/>" value="<inp2:Field field="$Field"/>" size="3" />
+ </td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="confs_detail_row">
+ <inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
+ <tr class="subsectiontitle">
+ <td colspan="4">
+ <inp2:Field name="ConfigHeader" as_label="1"/>
+ </td>
+ </tr>
+ </inp2:m_if>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text">
+ <inp2:Field field="DisplayName" as_label="true" />
+ <inp2:m_if check="m_IsDebugMode">
+ <br /><small>[ID: <b><inp2:Field name="SearchConfigId"/></b>; DisplayOrder: <b><inp2:Field name="DisplayOrder"/></b>; Field: <b><inp2:Field name="FieldName"/></b>]</small>
+ </inp2:m_if>
+ </td>
+ <inp2:m_ParseBlock name="confs_checkbox_td" pass_params="true" IdField="SearchConfigId" Label="la_prompt_SimpleSearch" Field="SimpleSearch" />
+ <inp2:m_ParseBlock name="confs_edit_text" pass_params="true" IdField="SearchConfigId" Label="la_prompt_weight" Field="Priority" />
+ <inp2:m_ParseBlock name="confs_checkbox_td" pass_params="true" IdField="SearchConfigId" Label="la_prompt_AdvancedSearch" Field="AdvancedSearch" />
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_values">
+ <tr class="subsectiontitle">
+ <td colspan="4">
+ <inp2:m_phrase name="$module_item" /> <inp2:m_phrase name="la_prompt_relevence_settings" />
+ </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td colspan="4">
+ <inp2:m_phrase name="la_prompt_required_field_increase"/>
+ <input type="text" size="3" name="conf[SearchRel_Increase_<inp2:m_param name="module_key" />][VariableValue]" VALUE="<inp2:Field field="SearchRel_Increase_{$module_key}" />">%
+ </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td colspan="4">
+ <inp2:m_phrase name="la_prompt_relevence_percent"/>
+ <input type="text" size="3" name="conf[SearchRel_Keyword_<inp2:m_param name="module_key" />][VariableValue]" value="<inp2:Field field="SearchRel_Keyword_{$module_key}" />">% <inp2:Field field="SearchRel_Keyword_{$module_key}_prompt" as_label="1" /> &nbsp;&nbsp;&nbsp;
+ <input type="text" size="3" name="conf[SearchRel_Pop_<inp2:m_param name="module_key" />][VariableValue]" value="<inp2:Field field="SearchRel_Pop_{$module_key}" />">% <inp2:Field field="SearchRel_Pop_{$module_key}_prompt" as_label="1" />&nbsp;&nbsp;&nbsp;
+ <input type="text" size="3" name="conf[SearchRel_Rating_<inp2:m_param name="module_key" />][VariableValue]" value="<inp2:Field field="SearchRel_Rating_{$module_key}" />">% <inp2:Field field="SearchRel_Rating_{$module_key}_prompt" as_label="1" />
+ </td>
+ </tr>
+
+ <inp2:m_if check="m_GetEquals" name="module" value="In-Portal" inverse="inverse">
+ <tr class="subsectiontitle">
+ <td colspan="4">
+ <inp2:m_phrase name="$module_item" /> <inp2:m_phrase name="la_prompt_multipleshow" />
+ </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text" width="120"><inp2:Field field="Search_ShowMultiple_{$module_key}_prompt" as_label="1"/></td>
+ <td class="text" colspan="3">
+ <input type="checkbox" name="_cb_conf[Search_ShowMultiple_<inp2:m_param name="module_key" />][VariableValue]" <inp2:Field field="Search_ShowMultiple_{$module_key}" checked="checked" db="db"/> id="_cb_conf[Search_ShowMultiple_<inp2:m_param name="module_key" />][VariableValue]" onclick="update_checkbox(this, document.getElementById('conf[Search_ShowMultiple_<inp2:m_param name="module_key" />][VariableValue]'))" >
+ <input type="hidden" id="conf[Search_ShowMultiple_<inp2:m_param name="module_key" />][VariableValue]" name="conf[Search_ShowMultiple_<inp2:m_param name="module_key" />][VariableValue]" value="<inp2:Field field="Search_ShowMultiple_{$module_key}" db="db"/>">
+ </td>
+ </tr>
+ </inp2:m_if>
+</inp2:m_DefineElement>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder"<inp2:m_if check="conf_ShowRelevance"> style="border-bottom-width: 0px;"</inp2:m_if>>
+ <inp2:confs_PrintList render_as="confs_detail_row" />
+</table>
+
+<inp2:m_if check="conf_ShowRelevance">
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:conf_PrintConfList block="config_values" />
+</table>
+</inp2:m_if>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/config/config_search.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/sections_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/sections_list.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/sections_list.tpl (revision 5450)
@@ -0,0 +1,56 @@
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<link rel="stylesheet" rev="stylesheet" href="incs/sections_list.css" type="text/css" />
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+
+<inp2:m_DefineElement name="section_list_header">
+ <!-- section header -->
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
+ <tr style="background: url(<inp2:$SectionPrefix_ModulePath module="#session#"/>img/logo_bg.gif) no-repeat top right;">
+ <td valign="top" class="admintitle" align="left" style="padding-top: 2px; padding-bottom: 2px;">
+ <inp2:m_if check="m_RecallEquals" name="section" value="in-portal:root">
+ <img width="46" height="46" src="<inp2:$SectionPrefix_ModulePath/>img/icons/<inp2:adm_GetSectionIcon icon="icon46_{$icon}"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$label" default="$label"/>">&nbsp;<inp2:adm_GetSectionTitle phrase="$label" default="$label"/>
+ <inp2:m_else/>
+ <img width="46" height="46" src="<inp2:$SectionPrefix_ModulePath/>img/icons/<inp2:adm_GetSectionIcon icon="icon46_{$icon}"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$label"/>">&nbsp;<inp2:adm_GetSectionTitle phrase="$label"/>
+ </inp2:m_if>
+ </td>
+ </tr>
+ </table>
+
+ <inp2:m_ParseBlock name="blue_bar" prefix="$SectionPrefix" title_preset="tree_#section#" icon="icon46_{$icon}"/>
+</inp2:m_DefineElement>
+
+<inp2:adm_PrintSection section_name="#session#" render_as="section_list_header"/>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td valign="top" width="100%">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_DefineElement name="section_element">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="subitem_icon">
+ <img src="<inp2:$SectionPrefix_ModulePath/>img/icons/icon46_list_<inp2:m_param name="icon"/>.gif" border="0" alt="<inp2:m_phrase name="$label"/>" align="absmiddle"/>
+ </td>
+ <td class="subitem_description">
+ <a href="<inp2:m_param name="section_url"/>" class="dLink" title="<inp2:m_phrase name="$label"/>" target="main"><inp2:m_phrase name="$label"/></a>
+ <inp2:m_if check="m_ParamEquals" name="is_tab" value="1">
+ <inp2:m_phrase name="la_Description_{$parent}"/>
+ <inp2:m_else/>
+ <inp2:m_phrase name="la_Description_{$section_name}"/>
+ </inp2:m_if>
+ </td>
+ </tr>
+ </inp2:m_DefineElement>
+
+ <inp2:m_set odd_even="table_color1"/>
+ <inp2:adm_PrintSections block="section_element" section_name="#session#"/>
+ </table>
+ </td>
+
+ <td valign="top" align="right">
+ <inp2:adm_ModuleInclude template="summary/#section#"/>
+ </td>
+ </tr>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/kernel/admin_templates/sections_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/admin/tools/server_info.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/admin/tools/server_info.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/admin/tools/server_info.php (revision 5450)
@@ -0,0 +1,132 @@
+<?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/tools');
+$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:server_info');
+
+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");
+
+$envar = "env=" . BuildEnv();
+$section = 'in-portal:server_info';
+$sec = $objSections->GetSection($section);
+
+$parent = $objSections->GetSection($sec->Get("parent"));
+
+if(strlen($ParentUrl)>0)
+{
+ $cancelUrl = $ParentUrl;
+}
+else
+ $cancelUrl = $_SERVER['PHP_SELF']."?".$envar;
+
+$cancelUrl = $admin."/subitems.php?section=in-portal:tools&".$envar;
+
+//$title = admin_language("la_tab_QueryDB");
+
+$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY");
+
+$objCatToolBar = new clsToolBar();
+$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('sinfoform','','$cancelUrl',2,'');","tool_cancel.gif");
+//td.php_info, th.php_info { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
+$extra = "<style type=\"text/css\"><!--
+ body, td, th, h1, h2 {font-family: sans-serif;}
+ pre {margin: 0px; font-family: monospace;}
+ a:link {color: #000099; text-decoration: none; }
+ a:hover {text-decoration: underline;}
+ table {border-collapse: collapse;}
+ .center {text-align: center;}
+ .center table { margin-left: auto; margin-right: auto; text-align: left;}
+ .center th { text-align: center !important; }
+ th.php_info { border: 1px solid #000000; font-size: 75%; align: center; vertical-align: baseline;}
+ h1 {font-size: 150%; text-align: center;}
+ h2 {font-size: 125%; text-align: center;}
+ .p {text-align: left;}
+ .e {background-color: #ccccff; font-weight: bold; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
+ .h {background-color: #9999cc; font-weight: bold; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
+ .v {background-color: #cccccc; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
+ i {color: #666666; background-color: #cccccc; }
+ hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
+ //--></style>";
+
+int_header($objCatToolBar,NULL,$title, NULL, $extra);
+?>
+<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
+<tr><td class="table_color1">
+<form ID="sinfoform" name="sinfoform" action="" method=POST>
+<!-- before phpinfo -->
+<?php
+
+ob_start();
+
+ phpinfo();
+ $php_info .= ob_get_contents();
+
+ob_end_clean();
+
+$php_info = str_replace(" width=\"600\"", " width=\"100%\" align=\"center\"", $php_info);
+$php_info = str_replace("</body></html>", "", $php_info);
+
+$php_info = str_replace('<a href="http://www.php.net/"><img border="0"', '<a href="http://www.php.net/"><img border="0" align="right" ', $php_info);
+
+$php_info = str_replace(";", "; ", $php_info);
+$php_info = str_replace(",", ", ", $php_info);
+
+$php_info = str_replace("' '", " \<br>", $php_info);
+$php_info = str_replace("'", "", $php_info);
+
+// include_path:
+
+$php_info = str_replace(".:/", "/", $php_info);
+
+// paths:
+
+$php_info = str_replace(":/", "<br>/", $php_info);
+$php_info = str_replace("<br>//", "://", $php_info); // correct urls
+
+// LS_COLORS and some paths:
+
+$php_info = str_replace(";", "; ", $php_info);
+$php_info = str_replace(",", ", ", $php_info);
+
+// apache address :
+
+$php_info = str_replace("&lt; ", "<", $php_info);
+$php_info = str_replace("&gt;", ">", $php_info);
+
+$php_info = str_replace('<a name', '<a style="color: #000000" name', $php_info);
+
+// td styles
+
+//$php_info = str_replace("<td", "<td class=\"php_info\"", $php_info);
+//$php_info = str_replace("<th", "<th class=\"php_info\"", $php_info);
+
+$offset = strpos($php_info, "<table");
+
+print substr($php_info, $offset);
+
+?>
+<!-- after phpinfo -->
+</FORM>
+</td></tr>
+</TABLE>
+<?php int_footer(); ?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/admin/tools/server_info.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/admin/category/addimage.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/admin/category/addimage.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/admin/category/addimage.php (revision 5450)
@@ -0,0 +1,289 @@
+<?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/category');
+$relation_level = count( explode('/', REL_PATH) );
+define('FULL_PATH', realpath(dirname(__FILE__) . str_repeat('/..', $relation_level) ) );
+require_once FULL_PATH.'/kernel/startup.php';
+// new startup: end
+
+/* set the destination of the image upload, relative to the root path */
+$DestDir = 'kernel/images/';
+
+require_once ($pathtoroot.$admin."/include/elements.php");
+require_once ($pathtoroot."kernel/admin/include/navmenu.php");
+//require_once ($pathtolocal."admin/include/navmenu.php");
+require_once($pathtoroot.$admin."/browse/toolbar.php");
+require_once($pathtoroot.$admin."/listview/listview.php");
+
+$m = GetModuleArray();
+foreach($m as $key=>$value)
+{
+ $path = $pathtoroot. $value."admin/include/parser.php";
+ if(file_exists($path))
+ {
+ include_once($path);
+ }
+}
+
+unset($objEditCat);
+
+$objEditCat = new clsCatList();
+$objEditCat->SourceTable = $objSession->GetEditTable("Category");
+
+//Multiedit init
+$en = (int)$_GET["en"];
+$objEditCat->Query_Item("SELECT * FROM ".$objEditCat->SourceTable);
+$itemcount=$objEditCat->NumItems();
+$c = $objEditCat->GetItemByIndex($en);
+
+unset($objEditItems);
+
+$objEditItems = new clsImageList();
+$objEditItems->SourceTable = $objSession->GetEditTable("Images");
+
+if(isset($_POST["itemlist"]))
+{
+ if(is_array($_POST["itemlist"]))
+ {
+ $ImageId = $_POST["itemlist"][0];
+ }
+ else
+ {
+ $ImageId = $_POST["itemlist"];
+ }
+ $img = $objEditItems->GetItem($ImageId);
+ $img->Pending=TRUE;
+ $action = "m_img_edit";
+ $name = $img->Get("Name");
+}
+else
+{
+ $img = new clsImage();
+ $img->Set("ResourceId",$c->Get("ResourceId"));
+ $img->Set("ImageId",$img->FieldMin("ImageId")-1);
+ $img->Pending=TRUE;
+ $img->tablename = $objEditItems->SourceTable;
+ $action = "m_img_add";
+ $name = "'New Image'";
+
+}
+
+$envar = "env=" . BuildEnv() . "&en=$en";
+$section = 'in-portal:cat_imageedit';
+$ado = &GetADODBConnection();
+
+/* page header */
+$charset = GetRegionalOption('Charset');
+print <<<END
+<html>
+<head>
+ <title>In-portal</title>
+ <meta http-equiv="content-type" content="text/html;charset=$charset">
+ <meta http-equiv="Pragma" content="no-cache">
+ <script language="JavaScript">
+ imagesPath='$imagesURL'+'/';
+ </script>
+ <script src="$browseURL/common.js"></script>
+ <script src="$browseURL/toolbar.js"></script>
+ <script src="$browseURL/utility.js"></script>
+ <script src="$browseURL/checkboxes.js"></script>
+ <script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
+ <link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
+ <link rel="stylesheet" type="text/css" href="$cssURL/style.css">
+ <link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
+END;
+
+$objListToolBar = new clsToolBar();
+
+$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('category','CatEditStatus','".$admin."/category/addcategory_images.php',0);",$imagesURL."/toolbar/tool_select.gif");
+$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('category','CatEditStatus','".$admin."/category/addcategory_images.php',-1);", $imagesURL."/toolbar/tool_cancel.gif");
+
+$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Category")." '".$c->Get("Name")."' - ".prompt_language("la_Text_Image");
+$title .= " '".$name."'";
+int_header($objListToolBar,NULL,$title);
+if ($objSession->GetVariable("HasChanges") == 1) {
+?>
+<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
+ <tr>
+ <td valign="top">
+ <?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
+ </td>
+ </tr>
+</table>
+<?php } ?>
+<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
+<FORM enctype="multipart/form-data" ID="category" NAME="category" method="POST" ACTION="">
+<?php int_subsection_title(prompt_language("la_Text_Image")); ?>
+
+<TR <?php int_table_color(); ?> >
+ <TD><?php echo prompt_language("la_prompt_ImageId"); ?></TD>
+ <TD><?php if ($img->Get("ImageId") != -1) echo $img->Get("ImageId"); ?></TD>
+ <TD></TD>
+</TR>
+
+<TR <?php int_table_color(); ?> >
+ <TD><SPAN class="text" id="prompt_imgName"><?php echo prompt_language("la_prompt_Name"); ?></SPAN></TD>
+ <TD><input type=text tabindex="1" ValidationType="exists" NAME="imgName" size="30" VALUE="<?php echo inp_htmlize($img->parsetag("image_name")); ?>"></TD>
+ <TD></TD>
+</TR>
+
+<TR <?php int_table_color(); ?> >
+ <TD><SPAN class="text" id="prompt_imgAlt"><?php echo prompt_language("la_prompt_AltName"); ?></SPAN></TD>
+ <TD><input type=text ValidationType="exists" tabindex="2" NAME="imgAlt" size="30" VALUE="<?php echo inp_htmlize($img->parsetag("image_alt")); ?>"></TD>
+ <TD></TD>
+</TR>
+
+<TR <?php int_table_color(); ?> >
+ <TD><?php echo prompt_language("la_prompt_Status"); ?></TD>
+ <TD>
+ <input type=RADIO NAME="imgEnabled" tabindex="3" <?php if($img->Get("Enabled")==1) echo "CHECKED"; ?> VALUE="1"><?php echo prompt_language("la_Text_Enabled"); ?>
+ <input type=RADIO NAME="imgEnabled" tabindex="3" <?php if($img->Get("Enabled")==0) echo "CHECKED"; ?> VALUE="0"><?php echo prompt_language("la_Text_Disabled"); ?>
+ </TD>
+ <TD></TD>
+</TR>
+
+<TR <?php int_table_color(); ?> >
+ <TD><?php echo prompt_language("la_prompt_Primary"); ?></TD>
+ <TD><input type=checkbox NAME="imgDefault" tabindex="4" <?php if($img->Get("DefaultImg")==1) echo "CHECKED"; ?> VALUE="1"></TD>
+ <TD></TD>
+</TR>
+
+<TR <?php int_table_color(); ?> >
+ <TD><?php echo prompt_language("la_prompt_Priority"); ?></TD>
+ <TD><input type=text SIZE="5" NAME="imgPriority" tabindex="5" VALUE="<?php echo $img->Get("Priority"); ?>"></TD>
+ <TD></TD>
+</TR>
+
+
+<?php int_subsection_title(prompt_language("la_text_Thumbnail_Image")); ?>
+
+<TR <?php int_table_color(); ?> >
+ <TD><?php echo prompt_language("la_prompt_Location"); ?></TD>
+ <?php
+ if($img->Get("LocalThumb")==1 || strlen($img->Get("LocalThumb"))==0)
+ {
+ $local="checked";
+ $remote = "";
+ }
+ else
+ {
+ $remote="checked";
+ $local = "";
+ }
+ ?>
+ <TD>
+ <TABLE border=0>
+ <tr>
+ <TD>
+ <input type="radio" name="imgLocalThumb" tabindex="6" <?php echo $local; ?> VALUE="1"><?php echo prompt_language("la_prompt_upload"); ?>:
+ </td>
+ <td>
+ <input type=FILE NAME="imgThumbFile" tabindex="7" VALUE=""> <br />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="radio" name="imgLocalThumb" tabindex="6" <?php echo $remote; ?> VALUE="0"> <?php echo prompt_language("la_prompt_remote_url"); ?>:
+ </td>
+ <td>
+ <input type=text size=32 NAME="imgThumbUrl" tabindex="8" VALUE=""> <br />
+ </td>
+ </tr>
+ </table>
+ </TD>
+
+
+ <TD ALIGN="RIGHT">
+ <IMG SRC="<?php echo $img->ThumbURL(); ?>">
+ </TD>
+</TR>
+
+<?php int_subsection_title(prompt_language("la_Text_Full_Size_Image")); ?>
+
+<TR <?php int_table_color(); ?>>
+ <TD><?php echo prompt_language("la_text_Same_As_Thumbnail"); ?></TD>
+ <?php
+ if(($img->Get("SameImages")=="1") || !$img->Get("ImageId") || ($img->Get("ImageId") == "-1"))
+ {
+
+ $checked = "CHECKED";
+ $disabled = "DISABLED=\"true\"";
+ }
+ ?>
+ <TD><input type=checkbox id="imgSameImages" NAME="imgSameImages" tabindex="9" VALUE="1" <?php echo $checked; ?> ONCLICK="enableFullImage(this);"></TD>
+ <TD></TD>
+</TR>
+<TR <?php int_table_color(); ?>>
+ <TD><?php echo prompt_language("la_prompt_Location"); ?></TD>
+ <?php
+ if($img->Get("LocalImage")==1 || strlen($img->Get("LocalImage"))==0)
+ {
+ $local="checked";
+ $remote = "";
+ }
+ else
+ {
+ $remote="checked";
+ $local = "";
+ }
+ ?>
+ <TD>
+ <TABLE border=0>
+ <tr>
+ <TD>
+ <input id="full1" type="radio" name="imgLocalFull" tabindex="10" <?php echo $local; ?> VALUE="1"><?php echo prompt_language("la_prompt_upload"); ?>:
+ </td>
+ <td>
+ <input type=FILE ID="imgFullFile" NAME="imgFullFile" tabindex="11" VALUE=""> <br />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input id="full2" type="radio" name="imgLocalFull" tabindex="10" <?php echo $remote; ?> VALUE="0"> <?php echo prompt_language("la_prompt_remote_url"); ?>:
+ </td>
+ <td>
+ <input type=text size=32 ID="imgFullUrl" NAME="imgFullUrl" tabindex="12" VALUE=""> <br />
+ </td>
+ </tr>
+ </table>
+ </td>
+ <TD ALIGN="RIGHT">
+ <IMG SRC="<?php echo $img->FullURL(); ?>">
+ </TD>
+</TR>
+ <input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
+ <input type="hidden" name="CatEditStatus" VALUE="0">
+ <input type="hidden" name="DestDir" VALUE="<?php echo $DestDir; ?>">
+ <INPUT TYPE="hidden" NAME="ImageId" VALUE="<?php echo $img->Get("ImageId"); ?>">
+ <input TYPE="HIDDEN" NAME="ResourceId" VALUE="<?php echo $c->Get("ResourceId"); ?>">
+</FORM>
+</TABLE>
+
+<!-- CODE FOR VIEW MENU -->
+<form method="post" action="user_groups.php?<?php echo $envar; ?>" name="viewmenu">
+<input type="hidden" name="fieldname" value="">
+<input type="hidden" name="varvalue" value="">
+<input type="hidden" name="varvalue2" value="">
+<input type="hidden" name="Action" value="">
+</form>
+<script language="JavaScript">
+ enableFullImage(document.getElementById('imgSameImages'));
+ MarkAsRequired(document.getElementById("category"));
+</script>
+<!-- END CODE-->
+<?php int_footer(); ?>
+
Property changes on: branches/unlabeled/unlabeled-1.9.2/admin/category/addimage.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/admin/category/addpermission.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/admin/category/addpermission.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/admin/category/addpermission.php (revision 5450)
@@ -0,0 +1,344 @@
+<?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/category');
+$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
+
+require_once ($pathtoroot.$admin."/include/elements.php");
+require_once ($pathtoroot."kernel/admin/include/navmenu.php");
+//require_once ($pathtolocal."admin/include/navmenu.php");
+require_once($pathtoroot.$admin."/browse/toolbar.php");
+require_once($pathtoroot.$admin."/listview/listview.php");
+
+$m = GetModuleArray();
+foreach($m as $key=>$value)
+{
+ $path = $pathtoroot. $value."admin/include/parser.php";
+ if(file_exists($path))
+ {
+ include_once($path);
+ }
+}
+
+unset($objEditItems);
+
+$objEditItems = new clsCatList();
+$objEditItems->SourceTable = $objSession->GetEditTable('Category');
+
+$live_editing = $objSession->GetVariable('IsHomeCategory');
+if ($live_editing) {
+ $objEditItems->SourceTable = TABLE_PREFIX.'Category';
+}
+
+//Multiedit init
+$en = (int)$_GET["en"];
+$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable.($objEditItems->isLiveTable() ? ' WHERE CategoryId = 0' : ''));
+$itemcount=$objEditItems->NumItems();
+
+$c = $objEditItems->GetItemByIndex($en);
+
+if(!is_object($c))
+{
+ $c = new clsCategory();
+ $c->Set("CategoryId",0);
+}
+if($itemcount>1)
+{
+ if ($en+1 == $itemcount)
+ $en_next = -1;
+ else
+ $en_next = $en+1;
+
+ if ($en == 0)
+ $en_prev = -1;
+ else
+ $en_prev = $en-1;
+}
+$action = "m_edit_permissions";
+
+$envar = "env=" . BuildEnv() . "&en=$en";
+
+$section = 'in-portal:catperm_setperm';
+$Module = $_GET["module"];
+$GroupId = $_GET["GroupId"];
+
+$g = $objGroups->GetItem($GroupId);
+
+$objPermList = new clsPermList($c->Get("CategoryId"),$GroupId);
+$objPermList->LoadPermTree($c);
+
+$objParentPerms = new clsPermList($c->Get("ParentId"),$GroupId);
+$p = $objCatList->GetCategory($c->Get("ParentId"));
+$objParentPerms->LoadPermTree($p);
+
+$ado = &GetADODBConnection();
+
+/* page header */
+$charset = GetRegionalOption('Charset');
+print <<<END
+<html>
+<head>
+ <title>In-portal</title>
+ <meta http-equiv="content-type" content="text/html;charset=$charset">
+ <meta http-equiv="Pragma" content="no-cache">
+ <script language="JavaScript">
+ imagesPath='$imagesURL'+'/';
+ </script>
+ <script src="$browseURL/common.js"></script>
+ <script src="$browseURL/toolbar.js"></script>
+ <script src="$browseURL/utility.js"></script>
+ <script src="$browseURL/checkboxes.js"></script>
+ <script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
+ <link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
+ <link rel="stylesheet" type="text/css" href="$cssURL/style.css">
+ <link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
+END;
+
+//int_SectionHeader();
+//$back_url = $rootURL."admin/category/addpermission_modules.php?env=".BuildEnv()."&GroupId=$GroupId";
+$back_url = "javascript:do_edit_save('category','CatEditStatus','".$admin."/category/addpermission_modules.php',0);";
+
+if($c->Get("CategoryId")>0)
+{
+ $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Category")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Permissions");
+ $title .= " ".prompt_language("la_text_for")." '".$g->parsetag("group_name")."'";
+}
+else
+{
+ $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Root")." ".prompt_language("la_Text_Category")." - "."' - ".prompt_language("la_tab_Permissions");
+ $title .= " ".prompt_language("la_text_for")." '".$g->parsetag("group_name")."'";
+}
+
+$objListToolBar = new clsToolBar();
+
+$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('category','CatEditStatus','".$admin."/category/addpermission_modules.php',0);",$imagesURL."/toolbar/tool_select.gif");
+//$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('category','admin/category/addpermission_modules.php',-1);", $imagesURL."/toolbar/tool_cancel.gif");
+$objListToolBar->Add("img_cancel", "la_Cancel",$back_url,"swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","", $imagesURL."/toolbar/tool_cancel.gif");
+$sec = $objSections->GetSection($section);
+
+if($c->Get("CategoryId")==0)
+{
+ $sec->Set("left",NULL);
+ $sec->Set("right",NULL);
+
+}
+int_header($objListToolBar,NULL,$title);
+if ($objSession->GetVariable("HasChanges") == 1) {
+?>
+<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
+ <tr>
+ <td valign="top">
+ <?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
+ </td>
+ </tr>
+</table>
+<?php } ?>
+<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
+<TBODY>
+ <tr BGCOLOR="#e0e0da">
+ <td WIDTH="100%" CLASS="navar">
+ <img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
+ <span class="navbar"><A CLASS="control_link" HREF="<?php echo $back_url; ?>">
+ <?php echo prompt_language("la_Prompt_CategoryPermissions")."</A>&gt;"; ?></span>
+ <SPAN CLASS="NAV_CURRENT_ITEM"><?php echo $Module; ?></SPAN>
+ </td>
+ </TR>
+</TBODY>
+</TABLE>
+<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
+
+<FORM ID="category" NAME="category" method="POST" ACTION="">
+<TBODY>
+ <TR class="subsectiontitle">
+ <?php
+ echo "<TD>".prompt_language("la_prompt_Description")."</TD>";
+ if($c->Get("CategoryId")!=0)
+ {
+ echo "<TD>".prompt_language("la_ColHeader_PermInherited")."</TD>";
+ }
+ echo "<TD>".prompt_language("la_ColHeader_PermAccess")."</TD>\n";
+ if($c->Get("CategoryId")!=0)
+ {
+ echo "<td>".prompt_language("la_ColHeader_InheritFrom")."</TD>";
+ }
+ ?>
+ </TR>
+<?php
+ if($c->Get("CategoryId")>0)
+ {
+ $ParentCatList = "0".$c->Get("ParentPath");
+ }
+ else
+ $ParentCatList = "0".$c->GetParentField("ParentPath","","");
+ $ParentCats = explode("|",$ParentCatList);
+ $ParentCats = array_reverse($ParentCats);
+
+ $sql = "SELECT * FROM ".GetTablePrefix()."PermissionConfig WHERE ModuleId='$Module'";
+ $rs = $ado->Execute($sql);
+ while($rs && !$rs->EOF)
+ {
+ $perm = $rs->fields;
+ $Permission = $perm["PermissionName"];
+ $Desc = $perm["Description"];
+ echo "<TR ".int_table_color_ret().">\n";
+ echo "<TD>".prompt_language("$Desc")." [$Permission]</TD>";
+ $p = $objPermList->GetPermByName($Permission);
+ $checked = "";
+ $MatchCatPath = "";
+ if(is_object($p))
+ {
+ //echo $p->Get("Permission")." Found<br>\n";
+ if($p->Inherited)
+ {
+ $checked = " CHECKED";
+ $MatchCatPath = "";
+ if($c->Get("CategoryId")>0)
+ {
+ $MatchedCat = $objPermList->GetDefinedCategory($Permission,$GroupId);
+ }
+ else
+ $MatchedCat = $objParentPerms->GetDefinedCategory($Permission,$GroupId);
+
+ if(is_numeric($MatchedCat))
+ {
+ if($MatchedCat!=0)
+ {
+ $mcat = $objCatList->GetCategory($MatchedCat);
+ $MatchCatPath = language($objConfig->Get("Root_Name")).">".$mcat->Get("CachedNavbar");
+ }
+ else
+ $MatchCatPath = language($objConfig->Get("Root_Name"));
+ }
+ else
+ $MatchCatPath = "";
+ }
+ }
+ else
+ $checked = " CHECKED";
+ if($c->Get("CategoryId")!=0)
+ {
+ echo " <TD><INPUT access=\"chk".$Permission."\" ONCLICK=\"SetAccessEnabled(this); \" TYPE=CHECKBOX name=\"inherit[]\" VALUE=\"".$Permission."\" $checked></TD>\n";
+ }
+ else
+ {
+ if(is_object($p))
+ $p->Inherited = FALSE;
+ }
+ $checked = "";
+ $imgsrc="red";
+ if(is_object($p))
+ {
+ if($p->Get("PermissionValue"))
+ {
+ $checked = " CHECKED";
+ $imgsrc = "green";
+ $current = "true";
+ }
+ else
+ {
+ $imgsrc = "red";
+ $current = "false";
+ }
+ $disabled = "";
+ if($p->Inherited)
+ {
+ if($c->Get("CategoryId")!=0)
+ {
+ $InheritValue = $current;
+ $UnInheritValue = "false";
+ $disabled = "DISABLED=\"true\"";
+ }
+ else
+ {
+ $disabled = "";
+ $UnInheritValue = "false";
+ $InheritValue="false";
+
+ }
+ }
+ else
+ {
+ $disabled = "";
+ if($p->Get("PermissionValue"))
+ {
+ $InheritValue = "false"; //need to look this up!
+ }
+ else
+ $InheritValue = "false";
+ $UnInheritValue = $current;
+ }
+
+ }
+ else
+ {
+ if($c->Get("CategoryId")!=0)
+ {
+ $disabled = "DISABLED=\"true\"";
+ $InheritValue = "false";
+ $UnInheritValue = "false";
+ $Matched = FALSE;
+ $MatchCatPath = "";
+ $MatchedCat = $objPermList->GetDefinedCategory($Permission,$GroupId);
+ if(is_numeric($MatchedCat))
+ {
+ if($MatchedCat>0)
+ {
+ $mcat = $objCatList->GetCategory($MatchedCat);
+ $MatchCatPath =language($objConfig->Get("Root_Name")).">".$mcat->Get("CachedNavbar");
+ }
+ else
+ $MatchCatPath = language($objConfig->Get("Root_Name"));
+ }
+ else
+ $MatchCatPath = "";
+ }
+ else
+ {
+ $disabled = "";
+ $UnInheritValue = "false";
+ $InheritValue="false";
+ }
+ }
+ echo " <TD><INPUT $disabled InheritValue=\"$InheritValue\" UnInheritValue=\"$UnInheritValue\" ID=\"chk".$Permission."\" ONCLICK=\"SetPermImage(this); \" permimg=\"img".$Permission."\" TYPE=CHECKBOX name=\"permvalue[]\" VALUE=\"".$Permission."\" $checked>";
+
+ echo " <img ID=\"img".$Permission."\" SRC=\"$imagesURL/perm_".$imgsrc.".gif\">";
+ echo " </TD>\n";
+ if($c->Get("CategoryId")!=0)
+ echo "<TD>$MatchCatPath</TD>";
+ echo "</TR>\n";
+ $rs->MoveNext();
+ }
+?>
+</TBODY>
+ <INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_edit_permissions">
+ <input type="hidden" NAME="GroupId" VALUE="<?php echo $GroupId; ?>">
+ <input TYPE="HIDDEN" NAME="CategoryId" VALUE="<?php echo $c->Get("CategoryId"); ?>">
+ <input type="hidden" name="CatEditStatus" VALUE="0">
+ <input TYPE="HIDDEN" NAME="Module" VALUE="<?php echo $Module; ?>">
+</FORM>
+</TABLE>
+<!-- CODE FOR VIEW MENU -->
+<form method="post" action="user_groups.php?<?php echo $envar; ?>" name="viewmenu">
+<input type="hidden" name="fieldname" value="">
+<input type="hidden" name="varvalue" value="">
+<input type="hidden" name="varvalue2" value="">
+<input type="hidden" name="Action" value="">
+</form>
+<!-- END CODE-->
+<?php int_footer(); ?>
Property changes on: branches/unlabeled/unlabeled-1.9.2/admin/category/addpermission.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/core/units/categories/categories_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/core/units/categories/categories_item.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/core/units/categories/categories_item.php (revision 5450)
@@ -0,0 +1,143 @@
+<?php
+
+ class CategoriesItem extends kDBItem
+ {
+ function Create($force_id=false, $system_create=false)
+ {
+ if (!$this->Validate()) return false;
+
+ $this->SetDBField('ResourceId', $this->Application->NextResourceId());
+ $this->SetDBField('CreatedById', $this->Application->GetVar('u_id') );
+ $this->SetDBField('CreatedOn_date', adodb_mktime() );
+ $this->SetDBField('CreatedOn_time', adodb_mktime() );
+
+ $this->checkFilename();
+ $this->generateFilename();
+
+ $this->SetDBField('ParentId', $this->Application->GetVar('m_cat_id') );
+ $ret = parent::Create($force_id, $system_create);
+ if ($ret) {
+ $sql = 'UPDATE %s SET ParentPath = %s WHERE CategoryId = %s';
+ $parent_path = $this->buildParentPath();
+ $this->Conn->Query( sprintf($sql, $this->TableName, $this->Conn->qstr($parent_path), $this->GetID() ) );
+
+ $this->SetDBField('ParentPath', $parent_path);
+ }
+ return $ret;
+
+ }
+
+ function Update($id=null, $system_update=false)
+ {
+ $this->checkFilename();
+ $this->generateFilename();
+
+ $ret = parent::Update($id, $system_update);
+ return $ret;
+ }
+
+ function buildParentPath()
+ {
+ $parent_id = $this->GetDBField('ParentId');
+
+ if ($parent_id == 0) {
+ $parent_path = '|';
+ }
+ else {
+ $cat_table = $this->Application->getUnitOption($this->Prefix, 'TableName');
+ $sql = 'SELECT ParentPath FROM '.$cat_table.' WHERE CategoryId = %s';
+ $parent_path = $this->Conn->GetOne( sprintf($sql, $parent_id) );
+ }
+
+ return $parent_path.$this->GetID().'|';
+ }
+
+ /**
+ * replace not allowed symbols with "_" chars + remove duplicate "_" chars in result
+ *
+ * @param string $string
+ * @return string
+ */
+ function stripDisallowed($string)
+ {
+ $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', '`',
+ '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', '~',
+ '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ',');
+
+ $string = str_replace($not_allowed, '_', $string);
+ $string = preg_replace('/(_+)/', '_', $string);
+ $string = $this->checkAutoFilename($string);
+
+ return $string;
+ }
+
+ function checkFilename()
+ {
+ if( !$this->GetDBField('AutomaticFilename') )
+ {
+ $filename = $this->GetDBField('Filename');
+ $this->SetDBField('Filename', $this->stripDisallowed($filename) );
+ }
+ }
+
+ function checkAutoFilename($filename)
+ {
+ if(!$filename) return $filename;
+
+ $item_id = !$this->GetID() ? 0 : $this->GetID();
+
+ // check temp table
+ $sql_temp = 'SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE Filename = '.$this->Conn->qstr($filename);
+ $found_temp_ids = $this->Conn->GetCol($sql_temp);
+
+ // check live table
+ $sql_live = 'SELECT '.$this->IDField.' FROM '.$this->Application->GetLiveName($this->TableName).' WHERE Filename = '.$this->Conn->qstr($filename);
+ $found_live_ids = $this->Conn->GetCol($sql_live);
+
+ $found_item_ids = array_unique( array_merge($found_temp_ids, $found_live_ids) );
+
+ $has_page = preg_match('/(.*)_([\d]+)([a-z]*)$/', $filename, $rets);
+
+ $duplicates_found = (count($found_item_ids) > 1) || ($found_item_ids && $found_item_ids[0] != $item_id);
+ if ($duplicates_found || $has_page) // other category has same filename as ours OR we have filename, that ends with _number
+ {
+ $append = $duplicates_found ? '_a' : '';
+ if($has_page)
+ {
+ $filename = $rets[1].'_'.$rets[2];
+ $append = $rets[3] ? $rets[3] : '_a';
+ }
+
+ // check live & temp table
+ $sql_temp = 'SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE (Filename = %s) AND ('.$this->IDField.' != '.$item_id.')';
+ $sql_live = 'SELECT '.$this->IDField.' FROM '.$this->Application->GetLiveName($this->TableName).' WHERE (Filename = %s) AND ('.$this->IDField.' != '.$item_id.')';
+ while ( $this->Conn->GetOne( sprintf($sql_temp, $this->Conn->qstr($filename.$append)) ) > 0 ||
+ $this->Conn->GetOne( sprintf($sql_live, $this->Conn->qstr($filename.$append)) ) > 0 )
+ {
+ if (substr($append, -1) == 'z') $append .= 'a';
+ $append = substr($append, 0, strlen($append) - 1) . chr( ord( substr($append, -1) ) + 1 );
+ }
+
+ return $filename.$append;
+ }
+
+ return $filename;
+ }
+
+ /**
+ * Generate item's filename based on it's title field value
+ *
+ * @return string
+ */
+ function generateFilename()
+ {
+ if ( !$this->GetDBField('AutomaticFilename') && $this->GetDBField('Filename') ) return false;
+
+ $title_field = $this->Application->getUnitOption($this->Prefix, 'TitleField');
+ $name = $this->stripDisallowed( $this->GetDBField($title_field) );
+
+ if ( $name != $this->GetDBField('Filename') ) $this->SetDBField('Filename', $name);
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/core/units/categories/categories_item.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/core/units/phrases/phrases_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/core/units/phrases/phrases_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/core/units/phrases/phrases_event_handler.php (revision 5450)
@@ -0,0 +1,78 @@
+<?php
+
+ class PhrasesEventHandler extends InpDBEventHandler
+ {
+ /**
+ * Forces new label in case if issued from get link
+ *
+ * @param kEvent $event
+ */
+ function OnNew(&$event)
+ {
+ parent::OnNew($event);
+ $label = $this->Application->GetVar('phrases_label');
+
+ $object =& $event->getObject( $label ? Array('live_table'=>true, 'skip_autoload' => true) : Array('skip_autoload' => true) );
+ if ($label) {
+ $object->SetDBField('Phrase',$label);
+ $object->SetDBField('LanguageId', $this->Application->GetVar('m_lang') );
+ $object->SetDBField('PhraseType',1);
+
+ $primary_language = $this->Application->GetDefaultLanguageId();
+ $live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $sql = 'SELECT Translation FROM %s WHERE Phrase = %s';
+ $primary_value = $this->Conn->GetOne( sprintf($sql, $live_table, $this->Conn->qstr($label) ) );
+ $object->SetDBField('PrimaryTranslation', $primary_value);
+ }
+
+ $last_module = $this->Application->GetVar('last_module');
+ if($last_module) $object->SetDBField('Module', $last_module);
+
+ if($event->Special == 'export' || $event->Special == 'import')
+ {
+ $object->SetDBField('PhraseType', '|0|1|2|');
+ $modules = $this->Conn->GetCol('SELECT Name FROM '.TABLE_PREFIX.'Modules');
+ $object->SetDBField('Module', '|'.implode('|', $modules).'|' );
+ }
+ }
+
+ /**
+ * Forces create to use live table
+ *
+ * @param kEvent $event
+ */
+ function OnBeforePhraseCreate(&$event)
+ {
+ $edit_direct = $this->Application->GetVar($event->Prefix.'_label');
+ if ($edit_direct) {
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ if ($this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id')) {
+ $object->SwitchToLive();
+ }
+ }
+ }
+
+ /**
+ * Save phrase change date & ip translation was made from
+ *
+ * @param kEvent $event
+ */
+ function OnSetLastUpdated(&$event)
+ {
+ $object =& $event->getObject();
+ $prev_translation = $this->Conn->GetOne('SELECT Translation FROM '.$object->TableName.' WHERE '.$object->IDField.' = '.(int)$object->GetId() );
+ if( $prev_translation != $object->GetDBField('Translation') )
+ {
+ $ip_address = getenv('HTTP_X_FORWARDED_FOR') ? getenv('HTTP_X_FORWARDED_FOR') : getenv('REMOTE_ADDR');
+ $object->SetDBField('LastChanged_date', adodb_mktime() );
+ $object->SetDBField('LastChanged_time', adodb_mktime() );
+ $object->SetDBField('LastChangeIP', $ip_address);
+ }
+
+ $cookie_path = $this->Application->IsAdmin() ? BASE_PATH.'/admin' : BASE_PATH;
+ setcookie('last_module', $object->GetDBField('Module'), $cookie_path, '.'.SERVER_NAME);
+ }
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/core/units/phrases/phrases_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/core/units/stylesheets/stylesheets_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/core/units/stylesheets/stylesheets_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/core/units/stylesheets/stylesheets_config.php (revision 5450)
@@ -0,0 +1,129 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'css',
+ 'ItemClass' => Array('class'=>'StylesheetsItem','file'=>'stylesheets_item.php','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'StylesheetsEventHandler','file'=>'stylesheets_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'css',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array('OnSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnCompileStylesheet',
+ ),
+ ),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+ 'IDField' => 'StylesheetId',
+
+ 'StatusField' => Array('Enabled'),
+
+ 'TitleField' => 'Name',
+
+ 'TitlePresets' => Array(
+ 'default' => Array( 'new_status_labels' => Array('css'=>'!la_title_Adding_Stylesheet!'),
+ 'edit_status_labels' => Array('css'=>'!la_title_Editing_Stylesheet!'),
+ 'new_titlefield' => Array('css'=>'!la_title_New_Stylesheet!'),
+ ),
+
+ 'styles_list' => Array('prefixes' => Array('css_List'), 'format' => "!la_title_Stylesheets! (#css_recordcount#)"),
+
+ 'stylesheets_edit' => Array('prefixes' => Array('css'), 'format' => "#css_status# '#css_titlefield#' - !la_title_General!"),
+
+ 'base_styles' => Array('prefixes' => Array('css','selectors.base_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BaseStyles! (#selectors.base_recordcount#)"),
+
+ 'block_styles' => Array('prefixes' => Array('css','selectors.block_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BlockStyles! (#selectors.block_recordcount#)"),
+
+ 'base_style_edit' => Array( 'prefixes' => Array('css','selectors'),
+ 'new_status_labels' => Array('selectors'=>'!la_title_Adding_BaseStyle!'),
+ 'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BaseStyle!'),
+ 'new_titlefield' => Array('selectors'=>'!la_title_New_BaseStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
+
+ 'block_style_edit' => Array( 'prefixes' => Array('css','selectors'),
+ 'new_status_labels' => Array('selectors'=>'!la_title_Adding_BlockStyle!'),
+ 'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BlockStyle!'),
+ 'new_titlefield' => Array('selectors'=>'!la_title_New_BlockStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
+
+ 'style_edit' => Array('prefixes' => Array('selectors'), 'format' => "!la_title_EditingStyle! '#selectors_titlefield#'"),
+ ),
+
+ 'PermSection' => Array('main' => 'in-portal:configure_styles'),
+
+ 'Sections' => Array(
+ 'in-portal:configure_styles' => Array(
+ 'parent' => 'in-portal:system',
+ 'icon' => 'style',
+ 'label' => 'la_tab_Stylesheets',
+ 'url' => Array('t' => 'stylesheets/stylesheets_list', 'pass' => 'm'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 4,
+ 'type' => stTREE,
+ ),
+
+ ),
+
+ 'TableName' => TABLE_PREFIX.'Stylesheets',
+ 'SubItems' => Array('selectorsbase', 'selectorsblock'),
+
+ 'FilterMenu' => Array(
+ 'Groups' => Array(
+ Array('mode' => 'AND', 'filters' => Array(0,1), 'type' => WHERE_FILTER),
+ ),
+
+ 'Filters' => Array(
+ 0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 1' ),
+ 1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 0' ),
+ )
+ ),
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ ), // key - special, value - list select sql
+ 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ ),
+ 'ListSortings' => Array(
+ '' => Array(
+ 'Sorting' => Array('Name' => 'asc'),
+ )
+ ),
+ 'Fields' => Array(
+ 'StylesheetId' => Array(),
+ 'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
+ 'Description' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'LastCompiled' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => '1','default' => '0'),
+ 'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1','default' => 0),
+ ),
+
+ 'VirtualFields' => Array(),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif',0=>'icon16_style_disabled.gif',1=>'icon16_style.gif'),
+ 'Fields' => Array(
+ 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td'),
+ 'Description' => Array( 'title'=>'la_col_Description', 'data_block' => 'grid_description_td' ),
+ 'Enabled' => Array( 'title'=>'la_col_Status' ),
+ 'LastCompiled' => Array('title' => 'la_col_LastCompiled'),
+ ),
+
+ ),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/core/units/stylesheets/stylesheets_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/core/units/general/inp_db_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/core/units/general/inp_db_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/core/units/general/inp_db_event_handler.php (revision 5450)
@@ -0,0 +1,123 @@
+<?php
+
+ class InpDBEventHandler extends kDBEventHandler
+ {
+
+ function mapEvents()
+ {
+ parent::mapEvents();
+ $common_events = Array( 'OnMassApprove'=>'iterateItems',
+ 'OnMassDecline'=>'iterateItems',
+ 'OnMassMoveUp'=>'iterateItems',
+ 'OnMassMoveDown'=>'iterateItems',
+ );
+
+ $this->eventMethods = array_merge($this->eventMethods, $common_events);
+ }
+
+ /**
+ * Apply same processing to each item beeing selected in grid
+ *
+ * @param kEvent $event
+ * @access private
+ */
+ function iterateItems(&$event)
+ {
+ if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+ return;
+ }
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ $this->StoreSelectedIDs($event);
+ $ids=$this->getSelectedIDs($event);
+
+ if($ids)
+ {
+ $status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+
+ foreach($ids as $id)
+ {
+ $object->Load($id);
+
+ switch ($event->Name)
+ {
+ case 'OnMassApprove':
+ $object->SetDBField($status_field, 1);
+ break;
+
+ case 'OnMassDecline':
+ $object->SetDBField($status_field, 0);
+ break;
+
+ case 'OnMassMoveUp':
+ $object->SetDBField('Priority', $object->GetDBField('Priority') + 1);
+ break;
+
+ case 'OnMassMoveDown':
+ $object->SetDBField('Priority', $object->GetDBField('Priority') - 1);
+ break;
+ }
+
+ if( $object->Update() )
+ {
+ $event->status=erSUCCESS;
+ $event->redirect_params = Array('opener' => 's', 'pass_events' => true); //stay!
+ }
+ else
+ {
+ $event->status=erFAIL;
+ $event->redirect=false;
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param kEvent $event
+ */
+ function OnMassClone(&$event)
+ {
+ if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+ return;
+ }
+
+ $event->status=erSUCCESS;
+
+ $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+
+ $this->StoreSelectedIDs($event);
+ $ids=$this->getSelectedIDs($event);
+
+ if($ids)
+ {
+ $temp->CloneItems($event->Prefix, $event->Special, $ids);
+ }
+ }
+
+ function check_array($records, $field, $value)
+ {
+ foreach ($records as $record)
+ {
+ if ($record[$field] == $value)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function OnPreSavePopup(&$event)
+ {
+ $object =& $event->getObject();
+ $this->RemoveRequiredFields($object);
+ $event->CallSubEvent('OnPreSave');
+
+ $this->finalizePopup($event);
+ }
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/core/units/general/inp_db_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.9.2/core/admin_templates/groups/permissions_selector.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.9.2/core/admin_templates/groups/permissions_selector.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.9.2/core/admin_templates/groups/permissions_selector.tpl (revision 5450)
@@ -0,0 +1,80 @@
+<inp2:m_RequireLogin permissions="in-portal:user_groups.advanced:manage_permissions" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+
+<inp2:m_ParseBlock name="section_header" prefix="g" icon="icon46_usergroups" module="in-portal" title="!la_title_Groups!"/>
+
+<inp2:m_ParseBlock name="blue_bar" prefix="g" title_preset="groups_edit_additional_permissions" module="in-portal" icon="icon46_usergroups"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ set_hidden_field('advanced_save', 1);
+ submit_event('g-perm','OnGroupSavePermissions');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ window.close();
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<inp2:g_SaveWarning name="grid_save_warning"/>
+
+<inp2:m_DefineElement name="permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_param name="section_name"/>.<inp2:m_param name="perm_name"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+
+<inp2:m_DefineElement name="old_permission_element" prefix="g-perm">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td>
+ <inp2:m_phrase name="$label"/>
+ </td>
+ <td>
+ <input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
+ <input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:g-perm_LoadPermissions/>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_set {$PrefixSpecial}_sequence="1" odd_even="table_color1"/>
+
+ <tr class="subsectiontitle">
+ <td><inp2:m_phrase label="la_col_PermissionName"/></td>
+ <td><inp2:m_phrase label="la_col_PermissionValue"/></td>
+ </tr>
+ <inp2:m_if check="m_GetEquals" name="section_name" value="in-portal:root">
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="LOGIN" label="lu_PermName_Login_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="ADMIN" label="lu_PermName_Admin_desc"/>
+ <inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="SYSTEM_ACCESS.READONLY" label="la_PermName_SystemAccess.ReadOnly_desc"/>
+ <inp2:m_else/>
+ <inp2:adm_ListSectionPermissions render_as="permission_element" type="1"/>
+ </inp2:m_if>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.2/core/admin_templates/groups/permissions_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline