Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Jun 24, 11:30 PM

in-portal

Index: branches/unlabeled/unlabeled-1.13.2/kernel/admin_templates/popups/translator.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.13.2/kernel/admin_templates/popups/translator.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.13.2/kernel/admin_templates/popups/translator.tpl (revision 7394)
@@ -0,0 +1,90 @@
+<inp2:m_RequireLogin perm_event="trans:OnLoad"/>
+<!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">-->
+<html>
+<head>
+<title>In-Portal :: Administration Panel</title>
+
+<meta http-equiv="content-type" content="text/html; charset=<inp2:trans_Field field="Charset"/>">
+<meta name="keywords" content="...">
+<meta name="description" content="...">
+<meta name="robots" content="all">
+<meta name="copyright" content="Copyright &#174; 2006 Test, Inc">
+<meta name="author" content="Intechnic Inc.">
+
+<inp2:m_base_ref/>
+
+<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
+<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
+<link rel="stylesheet" rev="stylesheet" href="incs/style.css" type="text/css" />
+
+<script language="javascript" src="js/is.js"></script>
+<script language="javascript" src="js/script.js"></script>
+<script language="javascript" src="js/in-portal.js"></script>
+<script language="javascript" src="js/toolbar.js"></script>
+<script language="javascript" src="js/grid.js"></script>
+<script language="javascript" src="js/tabs.js"></script>
+<script language="javascript">
+var t = '<inp2:m_get param="t"/>';
+var popups = '1';
+var multiple_windows = '1';
+var main_title = '<inp2:m_GetConfig var="Site_Name" escape="1"/>';
+var tpl_changed = 0;
+var base_url = '<inp2:m_BaseURL/>';
+var $base_path = '<inp2:m_GetConst name="BASE_PATH"/>';
+var img_path = '<inp2:m_TemplatesBase module="#MODULE#"/>/img/';
+
+</script>
+</head>
+
+<inp2:m_include t="incs/blocks"/>
+<inp2:m_include t="incs/in-portal"/>
+
+<inp2:m_ParseBlock name="kernel_form"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+
+<inp2:m_ParseBlock name="blue_bar" prefix="trans" title_preset="trans_edit" module="in-commerce"/>
+
+<!-- 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() {
+ submit_event('trans','OnSaveAndClose');
+ }
+ ) );
+ 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>
+
+<input type="hidden" name="trans_prefix" value="<inp2:m_get var="trans_prefix"/>">
+<input type="hidden" name="trans_field" value="<inp2:m_get var="trans_field"/>">
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_ParseBlock name="inp_edit_hidden" prefix="trans" field="Language"/>
+
+ <inp2:m_ParseBlock name="subsection" title="!la_section_Translation!"/>
+ <inp2:m_ParseBlock name="inp_label" prefix="trans" title="!la_fld_Original!" field="Original"/>
+ <inp2:m_ParseBlock name="inp_edit_options" prefix="trans" field="SwitchLanguage" title="!la_fld_Language!" size="50" onchange="submit_event('trans', 'OnChangeLanguage')"/>
+
+ <inp2:m_if check="m_get" var="trans_multi_line" value="1">
+ <inp2:m_ParseBlock name="inp_edit_textarea" prefix="trans" field="Translation" title="!la_fld_Translation!" cols="50" rows="10"/>
+ <inp2:m_else/>
+ <inp2:m_ParseBlock name="inp_edit_box" prefix="trans" field="Translation" title="!la_fld_Translation!" size="50"/>
+ </inp2:m_if>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.13.2/kernel/admin_templates/popups/translator.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.13.2/admin/install/inportal_remove.sql
===================================================================
--- branches/unlabeled/unlabeled-1.13.2/admin/install/inportal_remove.sql (nonexistent)
+++ branches/unlabeled/unlabeled-1.13.2/admin/install/inportal_remove.sql (revision 7394)
@@ -0,0 +1,219 @@
+DROP TABLE Addresses
+# --------------------------------------------------------
+DROP TABLE AffiliatePayments
+# --------------------------------------------------------
+DROP TABLE AffiliatePlans
+# --------------------------------------------------------
+DROP TABLE AffiliatePlansBrackets
+# --------------------------------------------------------
+DROP TABLE AffiliatePlansItems
+# --------------------------------------------------------
+DROP TABLE AffiliatePaymentTypes
+# --------------------------------------------------------
+DROP TABLE Affiliates
+# --------------------------------------------------------
+DROP TABLE Currencies
+# --------------------------------------------------------
+DROP TABLE GatewayConfigFields
+# --------------------------------------------------------
+DROP TABLE GatewayConfigValues
+# --------------------------------------------------------
+DROP TABLE Gateways
+# --------------------------------------------------------
+DROP TABLE Manufacturers
+# --------------------------------------------------------
+DROP TABLE OrderItems
+# --------------------------------------------------------
+DROP TABLE Orders
+# --------------------------------------------------------
+DROP TABLE PaymentTypeCurrencies
+# --------------------------------------------------------
+DROP TABLE PaymentTypes
+# --------------------------------------------------------
+DROP TABLE ProductFiles
+# --------------------------------------------------------
+DROP TABLE Products
+# --------------------------------------------------------
+DROP TABLE ProductsCouponItems
+# --------------------------------------------------------
+DROP TABLE ProductsCoupons
+# --------------------------------------------------------
+DROP TABLE ProductsDiscountItems
+# --------------------------------------------------------
+DROP TABLE ProductsDiscounts
+# --------------------------------------------------------
+DROP TABLE ProductsPricing
+# --------------------------------------------------------
+DROP TABLE ShippingBrackets
+# --------------------------------------------------------
+DROP TABLE ShippingCosts
+# --------------------------------------------------------
+DROP TABLE ShippingQuoteEngines
+# --------------------------------------------------------
+DROP TABLE ShippingType
+# --------------------------------------------------------
+DROP TABLE ShippingZones
+# --------------------------------------------------------
+DROP TABLE ShippingZonesDestinations
+# --------------------------------------------------------
+DROP TABLE TaxZones
+# --------------------------------------------------------
+DROP TABLE TaxZonesDestinations
+# --------------------------------------------------------
+DROP TABLE UserDownloads
+# --------------------------------------------------------
+DROP TABLE UserFileAccess
+# --------------------------------------------------------
+DROP TABLE Censorship
+# --------------------------------------------------------
+DROP TABLE Emoticon
+# --------------------------------------------------------
+DROP TABLE Topic
+# --------------------------------------------------------
+DROP TABLE Posting
+# --------------------------------------------------------
+DROP TABLE PrivateMessageBody
+# --------------------------------------------------------
+DROP TABLE PrivateMessages
+# --------------------------------------------------------
+DROP TABLE Link
+# --------------------------------------------------------
+DROP TABLE LinkValidation
+# --------------------------------------------------------
+DROP TABLE ListingTypes
+# --------------------------------------------------------
+DROP TABLE Listings
+# --------------------------------------------------------
+DROP TABLE News
+# --------------------------------------------------------
+DROP TABLE Pages
+# --------------------------------------------------------
+DROP TABLE PageContent
+# --------------------------------------------------------
+DROP TABLE BanRules
+# --------------------------------------------------------
+DROP TABLE Cache
+# --------------------------------------------------------
+DROP TABLE Category
+# --------------------------------------------------------
+DROP TABLE CategoryItems
+# --------------------------------------------------------
+DROP TABLE ConfigurationAdmin
+# --------------------------------------------------------
+DROP TABLE ConfigurationValues
+# --------------------------------------------------------
+DROP TABLE CountCache
+# --------------------------------------------------------
+DROP TABLE CustomField
+# --------------------------------------------------------
+DROP TABLE CustomMetaData
+# --------------------------------------------------------
+DROP TABLE EmailLog
+# --------------------------------------------------------
+DROP TABLE EmailMessage
+# --------------------------------------------------------
+DROP TABLE EmailQueue
+# --------------------------------------------------------
+DROP TABLE EmailSubscribers
+# --------------------------------------------------------
+DROP TABLE Events
+# --------------------------------------------------------
+DROP TABLE Favorites
+# --------------------------------------------------------
+DROP TABLE IdGenerator
+# --------------------------------------------------------
+DROP TABLE IgnoreKeywords
+# --------------------------------------------------------
+DROP TABLE Images
+# --------------------------------------------------------
+DROP TABLE ImportScripts
+# --------------------------------------------------------
+DROP TABLE ItemRating
+# --------------------------------------------------------
+DROP TABLE ItemReview
+# --------------------------------------------------------
+DROP TABLE ItemTypes
+# --------------------------------------------------------
+DROP TABLE Language
+# --------------------------------------------------------
+DROP TABLE Modules
+# --------------------------------------------------------
+DROP TABLE PermCache
+# --------------------------------------------------------
+DROP TABLE PermissionConfig
+# --------------------------------------------------------
+DROP TABLE Permissions
+# --------------------------------------------------------
+DROP TABLE PersistantSessionData
+# --------------------------------------------------------
+DROP TABLE Phrase
+# --------------------------------------------------------
+DROP TABLE PhraseCache
+# --------------------------------------------------------
+DROP TABLE PortalGroup
+# --------------------------------------------------------
+DROP TABLE PortalUser
+# --------------------------------------------------------
+DROP TABLE Relationship
+# --------------------------------------------------------
+DROP TABLE SearchConfig
+# --------------------------------------------------------
+DROP TABLE SearchLog
+# --------------------------------------------------------
+DROP TABLE SessionData
+# --------------------------------------------------------
+DROP TABLE SpamControl
+# --------------------------------------------------------
+DROP TABLE StatItem
+# --------------------------------------------------------
+DROP TABLE StdDestinations
+# --------------------------------------------------------
+DROP TABLE StylesheetSelectors
+# --------------------------------------------------------
+DROP TABLE Stylesheets
+# --------------------------------------------------------
+DROP TABLE SuggestMail
+# --------------------------------------------------------
+DROP TABLE SysCache
+# --------------------------------------------------------
+DROP TABLE TagAttributes
+# --------------------------------------------------------
+DROP TABLE TagLibrary
+# --------------------------------------------------------
+DROP TABLE Theme
+# --------------------------------------------------------
+DROP TABLE ThemeFiles
+# --------------------------------------------------------
+DROP TABLE UserGroup
+# --------------------------------------------------------
+DROP TABLE UserSession
+# --------------------------------------------------------
+DROP TABLE Visits
+# --------------------------------------------------------
+DROP TABLE ProductOptions
+# --------------------------------------------------------
+DROP TABLE ProductOptionCombinations
+# --------------------------------------------------------
+DROP TABLE CategoryCustomData
+# --------------------------------------------------------
+DROP TABLE LinkCustomData
+# --------------------------------------------------------
+DROP TABLE NewsCustomData
+# --------------------------------------------------------
+DROP TABLE PortalUserCustomData
+# --------------------------------------------------------
+DROP TABLE ProductsCustomData
+# --------------------------------------------------------
+DROP TABLE TopicCustomData
+# --------------------------------------------------------
+DROP TABLE ImportCache
+# --------------------------------------------------------
+DROP TABLE FormFields
+# --------------------------------------------------------
+DROP TABLE Forms
+# --------------------------------------------------------
+DROP TABLE FormSubmissions
+# --------------------------------------------------------
+DROP TABLE PopupSizes
+#
+
Property changes on: branches/unlabeled/unlabeled-1.13.2/admin/install/inportal_remove.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.13.2/core/units/users/users_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.13.2/core/units/users/users_item.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.13.2/core/units/users/users_item.php (revision 7394)
@@ -0,0 +1,171 @@
+<?php
+ class UsersItem extends kDBItem {
+
+ var $persistantVars = Array();
+
+ function LoadPersistantVars($id=null)
+ {
+ $id = $id == -1 ? -1 : $this->GetID();
+ if (!$id) return ;
+ $sql = 'SELECT VariableValue, VariableName
+ FROM '.TABLE_PREFIX.'PersistantSessionData
+ WHERE PortalUserId = '.$id;
+ $this->persistantVars = $this->Conn->GetCol($sql, 'VariableName');
+ }
+
+ function setPersistantVar($var_name, $var_value)
+ {
+ $this->persistantVars[$var_name] = $var_value;
+
+ if ($this->GetID() > 0 || $this->GetID() == -1) {
+ $replace_hash = Array( 'PortalUserId' => $this->GetID(),
+ 'VariableName' => $var_name,
+ 'VariableValue' => $var_value
+ );
+ $this->Conn->doInsert($replace_hash, TABLE_PREFIX.'PersistantSessionData', 'REPLACE');
+ }
+ else {
+ $this->Application->StoreVar($var_name, $var_value);
+ }
+ }
+
+ function getPersistantVar($var_name)
+ {
+ return getArrayValue($this->persistantVars, $var_name);
+ }
+
+ function Load($id, $id_field_name = null)
+ {
+ $ret = parent::Load($id, $id_field_name);
+ if ($ret || $id == -1) {
+ $this->LoadPersistantVars($id);
+ }
+ return $ret;
+ }
+
+ /**
+ * Returns IDs of groups to which user belongs and membership is not expired
+ *
+ * @return Array
+ * @access public
+ */
+ function getMembershipGroups($force_reload = false)
+ {
+ $user_groups = $this->Application->RecallVar('UserGroups');
+ if($user_groups === false || $force_reload)
+ {
+ $sql = 'SELECT GroupId FROM %s WHERE (PortalUserId = %s) AND ( (MembershipExpires IS NULL) OR ( MembershipExpires >= UNIX_TIMESTAMP() ) )';
+ $sql = sprintf($sql, TABLE_PREFIX.'UserGroup', $this->GetID() );
+ return $this->Conn->GetCol($sql);
+ }
+ else
+ {
+ return explode(',', $user_groups);
+ }
+ }
+
+ /**
+ * Set's Login from Email if required by configuration settings
+ *
+ */
+ function setLogin()
+ {
+ if( $this->Application->ConfigValue('Email_As_Login') )
+ {
+ $this->SetDBField('Login', $this->GetDBField('Email') );
+ }
+ }
+
+ function SendEmailEvents()
+ {
+ switch( $this->GetDBField('Status') )
+ {
+ case 1:
+ if ($this->Application->ConfigValue('User_Password_Auto')) {
+ $this->Application->EmailEventAdmin('USER.VALIDATE', $this->GetID() );
+ $this->Application->EmailEventUser('USER.VALIDATE', $this->GetID() );
+ }
+ else {
+ $this->Application->EmailEventAdmin('USER.ADD', $this->GetID() );
+ $this->Application->EmailEventUser('USER.ADD', $this->GetID() );
+ }
+ break;
+
+ case 2:
+ $this->Application->EmailEventAdmin('USER.ADD.PENDING', $this->GetID() );
+ $this->Application->EmailEventUser('USER.ADD.PENDING', $this->GetID() );
+ break;
+ }
+ }
+
+ function isSubscriberOnly()
+ {
+ $subscribers_group_id = $this->Application->ConfigValue('User_SubscriberGroup');
+ $sql = 'SELECT PortalUserId
+ FROM '.TABLE_PREFIX.'UserGroup
+ WHERE GroupId = '.$subscribers_group_id.' AND
+ PortalUserId = '.$this->GetDBField('PortalUserId').' AND
+ PrimaryGroup = 1';
+ return $this->Conn->GetOne($sql) == $this->GetDBField('PortalUserId');
+ }
+
+ function Create($force_id=false, $system_create=false)
+ {
+ $ret = parent::Create($force_id, $system_create);
+ if ($ret) {
+ // find out how to syncronize user only when it's copied to live table
+ $sync_manager =& $this->Application->recallObjectP('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize');
+ $sync_manager->performAction('createUser', $this->FieldValues);
+ }
+ return $ret;
+ }
+
+
+ function Update($id=null, $system_update=false)
+ {
+ $ret = parent::Update($id, $system_update);
+ if ($ret) {
+ // find out how to syncronize user only when it's copied to live table
+ $sync_manager =& $this->Application->recallObjectP('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize');
+ $sync_manager->performAction('updateUser', $this->FieldValues);
+ }
+ return $ret;
+ }
+
+ /**
+ * Deletes the record from databse
+ *
+ * @access public
+ * @return bool
+ */
+ function Delete($id = null)
+ {
+ $ret = parent::Delete($id);
+ if ($ret) {
+ $sync_manager =& $this->Application->recallObjectP('UsersSyncronizeManager', null, Array(), 'InPortalSyncronize');
+ $sync_manager->performAction('deleteUser', $this->FieldValues);
+ }
+
+ return $ret;
+ }
+
+ function setName($full_name)
+ {
+ $full_name = explode(' ', $full_name);
+
+ if (count($full_name) > 2) {
+ $last_name = array_pop($full_name);
+ $first_name = implode(' ', $full_name);
+ }
+ else {
+ $last_name = $full_name[1];
+ $first_name = $full_name[0];
+ }
+
+ $this->SetDBField('FirstName', $first_name);
+ $this->SetDBField('LastName', $last_name);
+ }
+
+
+ }
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.13.2/core/units/users/users_item.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline