Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Jul 20, 6:32 AM

in-portal

Index: branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/changelog_1_1_8.txt
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/changelog_1_1_8.txt (revision 4549)
+++ branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/changelog_1_1_8.txt (revision 4550)
@@ -1,155 +1,155 @@
File in-portal/compat.php changed
File in-portal/globals.php changed
File in-portal/admin/index.php changed
File in-portal/admin/install.php changed
File in-portal/admin/subitems.php changed
File in-portal/admin/category/addcategory.php changed
File in-portal/admin/category/addcategory_custom.php changed
File in-portal/admin/category/addcategory_permissions.php changed
File in-portal/admin/category/addpermission.php changed
File in-portal/admin/category/addpermission_modules.php changed
File in-portal/admin/category/permcacheupdate.php changed
File in-portal/admin/config/addcustomfield.php is removed; release_1_1_7 revision 1.11
File in-portal/admin/config/addlang.php is removed; release_1_1_7 revision 1.15
File in-portal/admin/config/addlang_email.php is removed; release_1_1_7 revision 1.9
File in-portal/admin/config/addlang_export.php is removed; release_1_1_7 revision 1.6
File in-portal/admin/config/addlang_export_result.php is removed; release_1_1_7 revision 1.5
File in-portal/admin/config/addlang_labels.php is removed; release_1_1_7 revision 1.9
File in-portal/admin/config/config_lang.php is removed; release_1_1_7 revision 1.9
File in-portal/admin/config/config_search.php is removed; release_1_1_7 revision 1.10
File in-portal/admin/config/edit_customfields.php is removed; release_1_1_7 revision 1.10
File in-portal/admin/config/importlang.php is removed; release_1_1_7 revision 1.7
File in-portal/admin/config/importlang_progress.php is removed; release_1_1_7 revision 1.10
File in-portal/admin/editor/FCKeditor/css/fck_editorarea.php changed
File in-portal/admin/editor/FCKeditor/filemanager/upload/php/upload.php changed
File in-portal/admin/email/sendmail.php changed
File in-portal/admin/help/manual.pdf changed
File in-portal/admin/import/import_funcs.php changed
File in-portal/admin/include/elements.php changed
File in-portal/admin/include/mainscript.php changed
File in-portal/admin/include/sections.php changed
File in-portal/admin/install/inportal_data.sql changed
File in-portal/admin/install/inportal_schema.sql changed
File in-portal/admin/install/install_lib.php changed
File in-portal/admin/install/langpacks/english.lang changed
-File in-portal/admin/install/upgrades/changelog_1_1_8.txt is new; release_1_1_8 revision 1.1.2.7
+File in-portal/admin/install/upgrades/changelog_1_1_8.txt is new; release_1_1_8 revision 1.1.2.8
File in-portal/admin/install/upgrades/inportal_upgrade_v1.1.8.php is new; release_1_1_8 revision 1.1
File in-portal/admin/install/upgrades/inportal_upgrade_v1.1.8.sql is new; release_1_1_8 revision 1.3.2.3
File in-portal/admin/install/upgrades/readme_1_1_8.txt is new; release_1_1_8 revision 1.1.2.3
File in-portal/admin/listview/listview.php changed
File in-portal/admin/logs/searchlog.php changed
File in-portal/admin/modules/mod_status.php changed
File in-portal/admin/tree/ftiens4.js changed
File in-portal/admin/tree/tree.php changed
File in-portal/admin/users/addgroup.php changed
File in-portal/admin/users/addgroup_users.php changed
File in-portal/admin/users/adduser.php changed
File in-portal/admin/users/adduser_custom.php changed
File in-portal/kernel/action.php changed
File in-portal/kernel/frontaction.php changed
File in-portal/kernel/startup.php changed
File in-portal/kernel/admin/include/navmenu.php changed
File in-portal/kernel/admin/include/help/editcategory_general.txt changed
File in-portal/kernel/admin_templates/config/config_email.tpl is new; release_1_1_8 revision 1.1
File in-portal/kernel/admin_templates/config/config_search.tpl is new; release_1_1_8 revision 1.2
File in-portal/kernel/admin_templates/config/config_universal.tpl is new; release_1_1_8 revision 1.1.2.1
File in-portal/kernel/admin_templates/config_email/config_email_list.tpl is removed; release_1_1_7 revision 1.2
File in-portal/kernel/admin_templates/custom_fields/custom_fields_edit.tpl is new; release_1_1_8 revision 1.1
File in-portal/kernel/admin_templates/custom_fields/custom_fields_list.tpl is new; release_1_1_8 revision 1.1
File in-portal/kernel/admin_templates/incs/config_blocks.tpl is new; release_1_1_8 revision 1.1.2.1
File in-portal/kernel/admin_templates/incs/custom_blocks.tpl changed
File in-portal/kernel/admin_templates/incs/export.js changed
File in-portal/kernel/admin_templates/incs/form_blocks.tpl changed
File in-portal/kernel/admin_templates/incs/grid_blocks.tpl changed
File in-portal/kernel/admin_templates/incs/header.tpl changed
File in-portal/kernel/admin_templates/incs/just_close.tpl is new; release_1_1_8 revision 1.1.2.1
File in-portal/kernel/admin_templates/incs/script.js changed
File in-portal/kernel/admin_templates/incs/style.css changed
File in-portal/kernel/admin_templates/regional/languages_export.tpl changed
File in-portal/kernel/admin_templates/regional/languages_list.tpl changed
File in-portal/kernel/include/advsearch.php changed
File in-portal/kernel/include/category.php changed
File in-portal/kernel/include/customfield.php changed
File in-portal/kernel/include/custommetadata.php changed
File in-portal/kernel/include/image.php changed
File in-portal/kernel/include/item.php changed
File in-portal/kernel/include/itemdb.php changed
File in-portal/kernel/include/parseditem.php changed
File in-portal/kernel/include/portalgroup.php changed
File in-portal/kernel/include/portaluser.php changed
File in-portal/kernel/include/searchconfig.php changed
File in-portal/kernel/include/searchitems.php changed
File in-portal/kernel/units/categories/categories_config.php changed
File in-portal/kernel/units/categories/categories_event_handler.php changed
File in-portal/kernel/units/categories/categories_tag_processor.php changed
File in-portal/kernel/units/config_general/config_general_tag_processor.php changed
File in-portal/kernel/units/config_search/config_search_config.php changed
File in-portal/kernel/units/config_search/config_search_event_handler.php changed
File in-portal/kernel/units/config_search/config_search_tag_processor.php changed
File in-portal/kernel/units/configuration/configuration_config.php changed
File in-portal/kernel/units/configuration/configuration_event_handler.php changed
File in-portal/kernel/units/configuration/configuration_tag_processor.php changed
File in-portal/kernel/units/custom_data/custom_data_config.php is new; release_1_1_8 revision 1.2
File in-portal/kernel/units/custom_data/custom_data_event_handler.php is new; release_1_1_8 revision 1.1
File in-portal/kernel/units/custom_fields/custom_fields_config.php changed
File in-portal/kernel/units/custom_fields/custom_fields_event_handler.php changed
File in-portal/kernel/units/custom_fields/custom_fields_tag_processor.php is new; release_1_1_8 revision 1.2
File in-portal/kernel/units/custom_values/custom_value_event_handler.php is removed; release_1_1_7 revision 1.8
File in-portal/kernel/units/custom_values/custom_values_config.php is removed; release_1_1_7 revision 1.7
File in-portal/kernel/units/email_events/email_events_event_handler.php changed
File in-portal/kernel/units/general/cat_dbitem.php changed
File in-portal/kernel/units/general/cat_dbitem_export.php changed
File in-portal/kernel/units/general/cat_event_handler.php changed
File in-portal/kernel/units/general/inp1_parser.php changed
File in-portal/kernel/units/general/inp_db_event_handler.php changed
File in-portal/kernel/units/general/main_event_handler.php changed
File in-portal/kernel/units/general/my_application.php changed
File in-portal/kernel/units/general/xml_helper.php changed
File in-portal/kernel/units/general/helpers/multilanguage.php is new; release_1_1_8 revision 1.3.2.2
File in-portal/kernel/units/general/helpers/search_helper.php is new; release_1_1_8 revision 1.2
File in-portal/kernel/units/help/help_tag_processor.php changed
File in-portal/kernel/units/languages/import_xml.php changed
File in-portal/kernel/units/languages/languages_config.php changed
File in-portal/kernel/units/languages/languages_event_handler.php changed
File in-portal/kernel/units/languages/languages_item.php changed
File in-portal/kernel/units/modules/modules_event_handler.php changed
File in-portal/kernel/units/phrases/phrases_config.php changed
File in-portal/kernel/units/translator/translator_event_handler.php changed
File in-portal/kernel/units/users/users_config.php changed
File in-portal/kernel/units/users/users_event_handler.php changed
File in-portal/kernel/units/users/users_item.php changed
File in-portal/themes/default/categories/catlist_element.tpl changed
File in-portal/themes/default/register/register_dob.tpl changed
File in-portal/themes/default/register/register_form.tpl changed
File kernel4_dev/kernel4/application.php changed
File kernel4_dev/kernel4/event_handler.php changed
File kernel4_dev/kernel4/event_manager.php changed
File kernel4_dev/kernel4/globals.php changed
File kernel4_dev/kernel4/kbase.php changed
File kernel4_dev/kernel4/startup.php changed
File kernel4_dev/kernel4/db/db_connection.php changed
File kernel4_dev/kernel4/db/db_event_handler.php changed
File kernel4_dev/kernel4/db/db_tag_processor.php changed
File kernel4_dev/kernel4/db/dbitem.php changed
File kernel4_dev/kernel4/parser/tags.php changed
File kernel4_dev/kernel4/parser/template_parser.php changed
File kernel4_dev/kernel4/processors/main_processor.php changed
File kernel4_dev/kernel4/processors/tag_processor.php changed
File kernel4_dev/kernel4/utility/cache.php is new; release_1_1_8 revision 1.1
File kernel4_dev/kernel4/utility/debugger.php changed
File kernel4_dev/kernel4/utility/event.php changed
File kernel4_dev/kernel4/utility/factory.php changed
File kernel4_dev/kernel4/utility/formatters.php changed
File kernel4_dev/kernel4/utility/http_query.php changed
File kernel4_dev/kernel4/utility/params.php changed
File kernel4_dev/kernel4/utility/temp_handler.php changed
File kernel4_dev/kernel4/utility/unit_config_reader.php changed
File cmseditor/fckstyles.xml changed
File cmseditor/editor/dialog/fck_link/fck_link.js changed
Changes in phrases and events:
! <LANGUAGE PackName="English"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i:s A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>iso-8859-1</CHARSET><UNITSYSTEM>2</UNITSYSTEM>
! <LANGUAGE PackName="English" Encoding="base64"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i:s A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>iso-8859-1</CHARSET><UNITSYSTEM>2</UNITSYSTEM>
Property changes on: branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/changelog_1_1_8.txt
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.8
\ No newline at end of property
+1.1.2.9
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.73.2/kernel/frontaction.php
===================================================================
--- branches/unlabeled/unlabeled-1.73.2/kernel/frontaction.php (revision 4549)
+++ branches/unlabeled/unlabeled-1.73.2/kernel/frontaction.php (revision 4550)
@@ -1,1111 +1,1112 @@
<?php
switch($Action)
{
case "m_login":
// if($objSession->ValidSession()) $objSession->Logout();
//echo $objSession->GetSessionKey()."<br>\n";
$url_params = Array();
$application =& kApplication::Instance();
-
+
if ($objConfig->Get("CookieSessions") == 1 && $_COOKIE["cookies_on"] != "1") {
$FormError["login"]["login_user"] = language("lu_cookies_error");
}
- else
+ else
{
- $MissingCount = SetMissingDataErrors("login");
+ $MissingCount = SetMissingDataErrors("login");
if($MissingCount==2)
{
$FormError["login"]["login_user"]= language("lu_ferror_loginboth");
unset($FormError["login"]["login_password"]);
}
-
+
if($MissingCount==0)
{
if($_POST["login_user"]=="root")
{
$FormError["login"]["login_user"]= language("lu_access_denied");
}
else
{
$LoginCheck = $objSession->Login( $_POST["login_user"], md5($_POST["login_password"]) );
if($LoginCheck === true)
{
if( !headers_sent() && GetVar('usercookie') == 1 )
{
$c = $_POST["login_user"]."|";
$pw = $_POST["login_password"];
if(strlen($pw) < 31) $pw = md5($pw);
$c .= $pw;
set_cookie('login', $c, adodb_mktime() + 2592000);
}
-
+
// set new destination template if passed
$dest = GetVar('dest', true);
if(!$dest) $dest = GetVar('DestTemplate', true);
if($dest) $var_list['t'] = $dest;
-
+
$next_template = $objSession->GetVariable('next_template');
if($next_template)
{
$objSession->SetVariable('next_template','');
$var_list_update['t'] = $next_template;
-
+
$url_params['pass'] = 'all';
header('Location: ' . HREF_Wrapper('', $url_params) );
exit;
$var_list['t'] = $next_template.'.tpl';
}
elseif($var_list['t'] == 'login')
{
$var_list['t'] = 'index';
}
-
+
$event_params = Array('user' => $_POST['login_user'], 'pass' => $_POST['login_password']);
$application->HandleEvent( new kEvent('u:OnInpLogin', $event_params) );
-
- $redirect_template = getArrayValue($var_list_update, 't') ? $var_list_update['t'] : $var_list['t'];
+
+ $redirect_template = getArrayValue($var_list_update, 't') ? $var_list_update['t'] : $var_list['t'];
$application->Redirect($redirect_template);
-
+
}
else
{
switch($LoginCheck)
{
case -1: // user or/and pass wrong
$FormError["login"]["login_password"] = language("lu_incorrect_login");
break;
-
+
case -2: // user ok, but has no permission
$FormError["login"]["login_password"] = language("la_text_nopermissions");
break;
}
}
}
}
}
break;
-
+
case "m_resetpw":
$passed_key = $_GET['user_key'];
-
- $u = $objUsers->GetItemByField("PwResetConfirm", $passed_key);
- $found = is_object($u);
-
+
+ $u = $objUsers->GetItemByField("PwResetConfirm", $passed_key);
+ $found = is_object($u);
+
if($found)
- {
+ {
$exp_time = $u->Get('PwRequestTime') + 3600;
$u->Set("PwResetConfirm", '');
$u->Set("PwRequestTime", 0);
- if ($exp_time > adodb_mktime())
+ if ($exp_time > adodb_mktime())
{
$objSession->SetVariable('codevalidationresult', 'lu_resetpw_confirm_text');
$newpw = makepassword();
SetVar('user_password', $newpw);
$u->Set("Password",$newpw);
$u->Set("PassResetTime", adodb_mktime());
$u->Set("PwResetConfirm", '');
$u->Set("PwRequestTime", 0);
$u->Update();
$u->SendUserEventMail("USER.PSWD",$u->Get("PortalUserId"));
$u->SendAdminEventMail("USER.PSWD");
$u->Set("Password",md5($newpw));
$u->Update();
$u->Clean();
} else {
$objSession->SetVariable('codevalidationresult', 'lu_code_expired');
}
} else {
$objSession->SetVariable('codevalidationresult', 'lu_code_is_not_valid');
- }
+ }
break;
-
+
case "m_forgotpw":
$MissingCount = SetMissingDataErrors("forgotpw");
// $pass_reset_add = $objConfig->Get("Users_AllowReset");
-
+
if($MissingCount==0)
- {
+ {
$username = $_POST["username"];
$email = $_POST["email"];
$found = false;
$allow_reset = true;
if(strlen($username))
{
$u = $objUsers->GetItemByField("Login",$username);
if(is_object($u))
$found = ($u->Get("Login")==$username && $u->Get("Status")==1) && strlen($u->Get("Password"));
}
else if(strlen($email))
{
$u = $objUsers->GetItemByField("Email",$email);
if(is_object($u))
$found = ($u->Get("Email")==$email && $u->Get("Status")==1) && strlen($u->Get("Password"));
}
-
- if(is_object($u))
+
+ if(is_object($u))
{
$PwResetConfirm = $u->Get('PwResetConfirm');
$PwRequestTime = $u->Get('PwRequestTime');
$PassResetTime = $u->Get('PassResetTime');
$MinPwResetDelay = $u->Get('MinPwResetDelay');
- $allow_reset = (strlen($PwResetConfirm) ?
- adodb_mktime() > $PwRequestTime + $MinPwResetDelay :
+ $allow_reset = (strlen($PwResetConfirm) ?
+ adodb_mktime() > $PwRequestTime + $MinPwResetDelay :
adodb_mktime() > $PassResetTime + $MinPwResetDelay);
}
-
+
if($found && $allow_reset)
{
//$newpw = makepassword();
- //$objSession->Set('password', $newpw);
+ //$objSession->Set('password', $newpw);
$objSession->Set('tmp_user_id', $u->Get("PortalUserId"));
$objSession->Set('tmp_email', $u->Get("Email"));
//$u->Set("Password",$newpw);
//$u->Update();
$u->SendUserEventMail("USER.PSWDC",$u->Get("PortalUserId"));
//$u->SendAdminEventMail("USER.PSWDC");
//$u->Set("Password",md5($newpw));
//$u->Update();
$u->Clean();
-
+
$var_list['t'] = GetVar('Confirm');
}
else
{
if(!strlen($username) && !strlen($email))
- {
+ {
$FormError["forgotpw"]["username"] = language("lu_ferror_forgotpw_nodata");
$MissingCount++;
}
else
- {
+ {
$error_phrases=Array();
-
+
if($allow_reset)
{
$error_phrases['username']='lu_ferror_unknown_username';
$error_phrases['email']='lu_ferror_unknown_email';
}
else
{
$error_phrases['username']='lu_ferror_reset_denied';
$error_phrases['email']='lu_ferror_reset_denied';
}
-
+
foreach ($error_phrases as $field_name => $phrase_name) {
if(GetVar($field_name))
{
$FormError["forgotpw"][$field_name] = language($phrase_name);
break;
}
}
$MissingCount++;
}
if(strlen($_GET["error"]))
$var_list["t"] = $_GET["error"];
}
}
else
if(strlen($_GET["error"]))
$var_list["t"] = $_GET["error"];
break;
- case "m_subscribe_confirm":
-
- $t = "";
- $_GET["subscribe_email"] = $_POST["subscribe_email"];
- $SubscribeAddress = $_POST["subscribe_email"];
-
+ case "m_subscribe_confirm":
+
+ $t = "";
+ $_GET["subscribe_email"] = $_POST["subscribe_email"];
+ $SubscribeAddress = $_POST["subscribe_email"];
+
if(!ValidEmail($SubscribeAddress)&& strlen($SubscribeAddress))
{
$t = $_GET["Error"];
$objSession->SetVariable('SubscribeError', 'lu_invalid_emailaddress');
}
else
{
if((int)$objConfig->Get("User_SubscriberGroup")>0)
{
$g = $objGroups->GetItem($objConfig->Get("User_SubscriberGroup"));
if(is_object($g))
{
$email = $_POST["subscribe_email"];
if(strlen($email)>0)
{
$u = $objUsers->GetItemByField("Email",$email);
-
+
if(is_object($u))
{
if($u->CheckBanned())
{
$t = $_GET["Error"];
$objSession->SetVariable('SubscribeError', 'lu_subscribe_banned');
}
- else
+ else
{
if($u->IsInGroup($g->Get("GroupId")))
{
$t = $_GET["Unsubscribe"];
}
else
$t = $_GET["Subscribe"];
}
}
else
$t = $_GET["Subscribe"];
}
else
{
$t = $_GET["Error"];
$objSession->SetVariable('SubscribeError', 'lu_subscribe_no_address');
- }
+ }
}
else
{
$t = $_GET["Error"];
$objSession->SetVariable('SubscribeError', 'lu_subscribe_unknown_error');
}
- }
+ }
}
if(strlen($t))
{
$var_list["t"] = $t;
$var_list_update["t"] = $t;
}
$objSession->SetVariable('SubscribeAddress', $SubscribeAddress);
-
+
break;
case "m_subscribe":
if($_POST["buttons"][0]==language("lu_button_yes"))
- {
+ {
$SubscribeAddress = $_POST["subscribe_email"];
if(strlen($SubscribeAddress)>0)
- {
+ {
if(ValidEmail($SubscribeAddress))
- {
+ {
$GroupId = (int)$objConfig->Get("User_SubscriberGroup");
if ($GroupId)
- {
- $g = $objGroups->GetItem($GroupId);
+ {
+ $g = $objGroups->GetItem($GroupId);
$u = $objUsers->GetItemByField("Email",$SubscribeAddress);
if(is_object($u))
{
if(strtolower($u->Get("Email"))==strtolower($SubscribeAddress))
{
$bExists = TRUE;
}
else
$bExists = FALSE;
}
if($bExists)
- {
+ {
$g->AddUser($u->Get("PortalUserId"),0,false);
}
- else
+ else
{
$u = new clsPortalUser(NULL);
$u->Set("Email",$SubscribeAddress);
$u->Set("ip",$_SERVER['REMOTE_ADDR']);
$u->Set("CreatedOn",adodb_date("U"));
$u->Set("Status",1);
if(!$u->CheckBanned())
{
$u->Create();
$g->AddUser($u->Get("PortalUserId"),1,false);
}
else
- $SubscribeResult = "lu_subscribe_banned";
+ $SubscribeResult = "lu_subscribe_banned";
}
-
+
$SubscribeResult = "lu_subscribe_success";
$u->SendUserEventMail("USER.SUBSCRIBE",$u->Get("PortalUserId"));
$u->SendAdminEventMail("USER.SUBSCRIBE");
if(strlen($_GET["Subscribe"])>0)
$var_list["t"] = $_GET["Subscribe"];
- }
+ }
}
- else
+ else
{
$SubscribeResult = "lu_invalid_emailaddress";
}
}
- else
+ else
$SubscribeResult = "lu_subscribe_missing_address";
}
-
+
if(!strlen($SubscribeResult))
- $SubscribeResult = "lu_subscribe_success";
-
+ $SubscribeResult = "lu_subscribe_success";
+
break;
case "m_unsubscribe":
-
+
if($_POST["buttons"][0]==language("lu_button_yes"))
{
$MissingCount = SetMissingDataErrors("m_unsubscribe");
-
+
if($MissingCount==0)
- {
+ {
$email = $_POST["subscribe_email"];
$u = $objUsers->GetItemByField("Email",$email);
if(is_object($u))
{
if(strtolower($u->Get("Email"))==strtolower($email))
- {
+ {
$GroupId = (int)$objConfig->Get("User_SubscriberGroup");
if($u->PrimaryGroup()==$GroupId)
{
$u_gorup_list = $u->GetGroupList();
-
- if (count($u_gorup_list) > 1) {
+
+ if (count($u_gorup_list) > 1) {
$u->RemoveFromGroup($GroupId);
}
else {
$u->RemoveFromAllGroups();
$u->Delete();
}
- }
- else
+ }
+ else
{
$u->RemoveFromGroup($GroupId);
- }
+ }
}
}
if(strlen($_GET["Subscribe"])>0)
$var_list["t"] = $_GET["Subscribe"];
- }
+ }
}
-
+
break;
-
+
case "m_register":
$_POST=inp_escape($_POST);
$MissingCount = SetMissingDataErrors("m_register");
-
+
if(!$objConfig->Get("User_Password_Auto"))
- {
+ {
if(($_POST["password"] != $_POST["passwordverify"]) || !strlen($_POST["passwordverify"]))
{
$MissingCount++;
$FormError["m_register"]["passwordverify"] = language("lu_ferror_pswd_mismatch");
}
-
+
if(strlen($_POST["password"])>30)
{
// echo "VAR: ".$_POST["password"]; die();
$MissingCount++;
$FormError["m_register"]["password"] = language("lu_ferror_pswd_toolong");
}
-
+
if (strlen($_POST['password']) < $objConfig->Get("Min_Password"))
{
$MissingCount++;
- $FormError["m_register"]["password"] = language("lu_ferror_pswd_tooshort");
- }
+ $FormError["m_register"]["password"] = language("lu_ferror_pswd_tooshort");
+ }
}
-
+
if(($_POST["username"]=="root"))
{
$MissingCount++;
- $FormError["m_register"]["username"] = language("lu_user_exists");
+ $FormError["m_register"]["username"] = language("lu_user_exists");
}
else
{
-
- $u = $objUsers->GetItemByField("Login",$_POST["username"]);
+
+ $u = $objUsers->GetItemByField("Login",$_POST["username"]);
if(is_object($u))
{
if($u->Get("Login")==$_POST["username"])
{
$MissingCount++;
$FormError["m_register"]["username"] = language("lu_user_exists");
}
}
}
-
-
-
+
+
+
if (strlen($_POST['username']) < $objConfig->Get("Min_UserName"))
{
$MissingCount++;
- $FormError["m_register"]["username"] = language("lu_ferror_username_tooshort");
- }
-
+ $FormError["m_register"]["username"] = language("lu_ferror_username_tooshort");
+ }
+
if(!$MissingCount)
{
$CreatedOn = adodb_date("U");
$GroupId = $objConfig->Get("User_NewGroup");
$Status=0;
-
+
/* determine the status of new users */
- switch ($objConfig->Get("User_Allow_New"))
+ switch ($objConfig->Get("User_Allow_New"))
{
case "1":
$Status=1;
break;
case "3":
$Status=2;
break;
}
-
+
/* set Destination template */
$var_list["t"] = strlen($_GET["dest"])? $_GET["dest"] : "index";
-
+
if($Status>0)
- {
+ {
if ($objConfig->Get("User_Password_Auto")) {
$password = makepassword();
// $objSession->Set("password", $password);
SetVar('user_password', $password);
}
else {
$password = $_POST["password"];
}
-
- $dob = adodb_mktime(0, 0, 0, $_POST['dob_month'], $_POST['dob_day'], $_POST['dob_year']);
+
+ $dob = adodb_mktime(0, 0, 0, $_POST['dob_month'], $_POST['dob_day'], $_POST['dob_year']);
$ip = $_SERVER['REMOTE_ADDR'];
-
+
$fields_hash = Array('Login' => $_POST['username'],
'Password' => md5($password),
'FirstName' => $_POST['firstname'],
'LastName' => $_POST['lastname'],
'Company' => $_POST['company'],
'Email' => $_POST['email'],
'Status' => $Status,
'Phone' => $_POST['phone'],
'Fax' => $_POST['fax'],
'Street' => $_POST['street'],
'Street2' => $_POST['street2'],
'City' => $_POST['city'],
'State' => $_POST['state'],
'Zip' => $_POST['zip'],
'Country' => $_POST['country'],
'CreatedOn' => $CreatedOn,
'dob' => $dob,
'ip' => $ip);
$u =& $objUsers->Add_User_NEW($fields_hash, true);
-
+
if(!is_object($u))
{
$RuleId=$u;
$r = $objBanList->GetItem($RuleId);
$err = $r->Get("ErrorTag");
-
+
if(strlen($err))
{
$FormError["m_register"][$r->Get("ItemField")] = language($err);
$MissingCount++;
}
}
else
{
$u->Set("Password",$password);
$u->Clean();
if($GroupId>0)
{
$g = $objGroups->GetItem($GroupId);
$g->AddUser($u->Get("PortalUserId"),1,false);
}
-
+
$custom = $_POST["custom"];
if (is_array($custom)) {
for($x = 0; $x < count($custom); $x++) {
$u->SetCustomField($custom[$x],$_POST[$custom[$x]]);
}
$u->SaveCustomFields();
}
if($Status==1)
- {
+ {
if($objConfig->Get("User_Password_Auto"))
{
$u->SendUserEventMail("USER.VALIDATE",$u->Get("PortalUserId"));
$u->SendAdminEventMail("USER.VALIDATE");
}
else
{
- $doLoginNow = true;
+ $doLoginNow = true;
$u->SendUserEventMail("USER.ADD",$u->Get("PortalUserId"));
$u->SendAdminEventMail("USER.ADD");
}
}
else
- {
+ {
$u->SendUserEventMail("USER.ADD.PENDING",$u->Get("PortalUserId"));
$u->SendAdminEventMail("USER.ADD.PENDING");
}
if ($doLoginNow)
{
$login_ok = $objSession->Login($_POST["username"], md5($password));
if($login_ok)
{
$next_template = $objSession->GetVariable('next_template');
if($next_template)
{
$objSession->SetVariable('next_template','');
$var_list_update["t"] = $next_template;
header('Location: ' . HREF_Wrapper() );
exit;
$var_list['t'] = $next_template.'.tpl';
}
-
+
}
}
- }
- }
- }
+ }
+ }
+ }
break;
case "m_add_friend":
$id = $_GET["UserId"];
$userid = $objSession->Get("PortalUserId");
if($id!=$userid)
{
$u =& $objUsers->GetItem($id);
$u->AddFavorite($userid);
}
DeleteModuleTagCache('kernel');
break;
case "m_del_friend":
$id = $_GET["UserId"];
$userid = $objSession->Get("PortalUserId");
$u =& $objUsers->GetItem($id);
$u->DeleteFavorite();
DeleteModuleTagCache('kernel');
- break;
-
+ break;
+
case 'm_acctinfo':
$_POST = inp_escape($_POST);
$MissingCount = SetMissingDataErrors("m_acctinfo");
$UserId = $_GET["UserId"];
if ($UserId != $objSession->Get("PortalUserId")) {
$MissingCount++;
$FormError["m_acctinfo"]["UserId"] = language("lu_ferror_m_profile_userid");
}
-
+
if ($_POST["password"]) {
if (($_POST["password"] != $_POST["passwordverify"]) || !strlen($_POST["passwordverify"])) {
$MissingCount++;
$FormError["m_acctinfo"]["passwordverify"] = language("lu_ferror_pswd_mismatch");
}
if (strlen($_POST["password"])>30) {
// echo "VAR: ".$_POST["password"]; die();
$MissingCount++;
$FormError["m_acctinfo"]["password"] = language("lu_ferror_pswd_toolong");
}
if (strlen($_POST['password']) < $objConfig->Get("Min_Password")) {
$MissingCount++;
$FormError["m_acctinfo"]["password"] = language("lu_ferror_pswd_tooshort");
}
}
-
+
$db =& GetADODBConnection();
$email = GetVar('email');
$test_id = $db->GetOne('SELECT PortalUserId FROM '.GetTablePrefix().'PortalUser WHERE Email = '.$db->qstr($email));
if ($test_id && ($test_id != $objSession->Get('PortalUserId')) ) {
$MissingCount++;
$FormError["m_acctinfo"]["email"] = language("lu_ferror_email_duplicate");
}
-
-
+
+
if (!$MissingCount) {
/* save profile */
$u =& $objUsers->GetItem($UserId);
$status = $u->Get("Status");
$dob = adodb_mktime(0, 0, 0, $_POST['dob_month'], $_POST['dob_day'], $_POST['dob_year']);
$password = strlen($_POST["password"]) > 0 ? md5($_POST["password"]) : '';
-
+
$fields_hash = Array( 'Login' => $_POST['username'],
+ 'Password' => $password,
'FirstName' => $_POST['firstname'],
'LastName' => $_POST['lastname'],
'Company' => $_POST['company'],
'Email' => $_POST['email'],
'Status' => $status,
'Phone' => $_POST['phone'],
'Fax' => $_POST['fax'],
'Street' => $_POST['street'],
'Street2' => $_POST['street2'],
'City' => $_POST['city'],
'State' => $_POST['state'],
'Zip' => $_POST['zip'],
'Country' => $_POST['country'],
'dob' => $dob,
'MinPwResetDelay' => $_POST['minpwresetdelay'],
);
$user =& $objUsers->Edit_User_NEW($UserId, $fields_hash);
saveCustomFields('u', $u->Get('ResourceId'), 6);
}
DeleteModuleTagCache('kernel');
break;
case "m_profile":
$userid = $objSession->Get("PortalUserId");
if($userid>0)
{
$u = $objUsers->GetItem($userid);
foreach($_POST as $field=>$value)
{
if(substr($field,0,3)=="pp_")
{
$objSession->SetPersistantVariable($field,$value);
}
}
}
break;
case "m_set_lang":
$lang = $_GET["lang"];
$LangId = 0;
if(strlen($lang))
{
$l = $objLanguages->GetItemByField("PackName",$lang);
if(is_object($l))
{
$LangId = $l->Get("LanguageId");
}
}
if($LangId)
{
if($objSession->Get("PortalUserId")>0)
{
$objSession->SetPersistantVariable("Language",$LangId);
}
$objSession->Set("Language",$LangId);
$objSession->Update();
$m_var_list_update["lang"] = $LangId;
$m_var_list["lang"] = $LangId;
}
break;
case "m_set_theme":
$id = $_POST["ThemeId"];
if(!is_numeric($id))
$id = $_GET["ThemeId"];
if($id)
{
$objSession->SetThemeName($id);
$m_var_list["t"] = "index";
$m_var_list_update["theme"] = $id;
$m_var_list["theme"] = $id;
unset($CurrentTheme);
}
break;
case "m_sort_cats":
$objSession->SetVariable("Category_Sortfield",$_POST["Category_Sortfield"]);
$objSession->SetVariable("Category_Sortorder",$_POST["Category_Sortorder"]);
$objSession->SetVariable("Perpage_Category",$_POST["Perpage_Category"]);
DeleteModuleTagCache('kernel');
break;
case "m_add_cat_confirm":
$perm = 0;
$CategoryId=$objCatList->CurrentCategoryID();
if ($objSession->HasCatPermission("CATEGORY.ADD.PENDING"))
$perm = 2;
if ($objSession->HasCatPermission("CATEGORY.ADD"))
$perm = 1;
if ($perm == 0)
{
$MissingCount++;
$FormError["m_addcat"]["name"] = language("lu_ferror_no_access");
}
else
{
$MissingCount = SetMissingDataErrors("m_addcat");
if(is_array($_FILES))
{
foreach($_FILES as $field => $file)
{
$allowed = TRUE;
if(strlen($_POST["imagetypes"][$field]))
{
$types = explode(",",strtolower($_POST["imagetypes"][$field]));
if(is_array($types))
{
if(count($types)>0)
{
$path_parts = pathinfo($file["name"]);
$ext = $path_parts["extension"];
$allowed = in_array($ext,$types);
if(!$allowed)
{
$MissingCount++;
$FormError["m_addcat"][$field] = language("lu_ferror_wrongtype");
}
}
}
}
$maxsize = (int)$_POST["maxsize"][$field];
if($maxsize>0 && $allowed && $file["size"]>$maxsize)
{
$allowed = FALSE;
$MissingCount++;
$FormError["m_addcat"][$field] = language("lu_ferror_toolarge");
}
}
}
if($MissingCount==0)
{
$_POST = inp_striptags($_POST);
$fields_hash = Array( 'ParentId' => $objCatList->CurrentCategoryID(),
'Name' => $_POST['name'],
'Description' => $_POST['description'],
'CreatedOn' => adodb_date('U'),
'EditorsPick' => 0,
'Status' => $perm,
'HotItem' => 2,
'NewItem' => 2,
'PopItem' => 2,
'Priority' => 0,
'MetaKeywords' => $_POST['meta_keywords'],
'MetaDescription' => $_POST['meta_description'],
'AutomaticFilename' => 1,
'Filename' => '',
'CategoryTemplate' => '',
'ItemTemplate' => '',
);
$cat =& $objCatList->Add_NEW($fields_hash);
saveCustomFields('c', $cat->Get('ResourceId'), $cat->type);
$cat->UpdateCachedPath();
$cat->Update();
$cat->UpdateACL();
$objCatList->UpdateMissingCacheData();
if(strlen($_GET["Confirm"]))
{
$var_list["t"] = $_GET["Confirm"];
}
else
$var_list["t"] = $_GET["DestTemplate"];
}
}
DeleteModuleTagCache('kernel');
break;
case "m_front_review_add":
if($objSession->InSpamControl($_POST["ItemId"]))
{
$StatusMessage["review"] = language("la_Review_AlreadyReviewed");
}
else
{
$objReviews = new clsItemReviewList();
$Status = $objConfig->Get("Review_DefaultStatus");
$CreatedOn = adodb_date("U");
$html = (int)$objConfig->Get("Review_Html");
$ReviewText = inp_striptags($_POST["review_text"]);
$r = $objReviews->AddReview($CreatedOn,$ReviewText,$Status, $IPAddress,
0, $_POST["ItemId"], $_POST["ItemType"], $objSession->Get("PortalUserId"));
foreach($ItemTypes as $type=>$id)
{
if($id==$_POST["ItemType"])
{
$ValName = $type."_ReviewDelay_Value";
$IntName = $type."_ReviewDelay_Interval";
break;
}
}
if(strlen($ValName) && strlen($IntName))
{
$exp_secs = $objConfig->Get($ValName) * $objConfig->Get($IntName);
$objSession->AddToSpamControl($_POST["ItemId"],$exp_secs);
if(is_object($r))
{
if($Status)
{
$StatusMessage["review"] = language("la_Review_Added");
}
else
$StatusMessage["review"] = language("la_Review_Pending");
}
else
$StatusMessage["review"] = language("la_Review_Error");
}
else
$StatusMessage["error"] = language("la_ConfigError_Review");
}
DeleteModuleTagCache('kernel');
break;
case "m_suggest_email":
$cutoff = adodb_mktime()+(int)$objConfig->Get("Suggest_MinInterval");
$email = inp_striptags($_POST["suggest_email"]);
if (strlen($email))
{
if(ValidEmail($email))
{
$sql = "SELECT * FROM ".GetTablePrefix()."SuggestMail WHERE email='".$email."' and sent<".$cutoff;
$adodbConnection = &GetADODBConnection();
$rs = $adodbConnection->Execute($sql);
$rs = false;
if($rs && !$rs->EOF)
{
if(strlen($_GET["Error"])>0)
$var_list["t"] = $_GET["Error"];
$objSession->SetVariable('suggest_result', "$email ".language("lu_already_suggested ")." ".LangDate($rs->fields["sent"]) );
}
else
{
$Event =& $objMessageList->GetEmailEventObject("USER.SUGGEST");
if(is_object($Event))
{
if($Event->Get("Enabled")=="1")
{
$Event->Item = null;
$Event->SendToAddress($email);
$sql = "INSERT INTO ".GetTablePrefix()."SuggestMail (email,sent) VALUES ('".$email."','".adodb_mktime()."')";
$rs = $adodbConnection->Execute($sql);
$objSession->SetVariable('suggest_result', language("lu_suggest_success")." ".$email);
}
}
$e =& $objMessageList->GetEmailEventObject("USER.SUGGEST",1);
if($e->Get("Enabled")==1)
$e->SendAdmin();
if(strlen($_GET["Confirm"])>0)
$var_list["t"] = $_GET["Confirm"];
}
}
else
{
if(strlen($_GET["Error"])>0)
$var_list["t"] = $_GET["Error"];
$objSession->SetVariable('suggest_result', language("lu_invalid_emailaddress"));
}
}
else
{
if(strlen($_GET["Error"])>0)
$var_list["t"] = $_GET["Error"];
$objSession->SetVariable('suggest_result', language("lu_suggest_no_address"));
}
break;
case "m_simple_search":
$keywords = trim($_POST["keywords"]);
$type = $objItemTypes->GetTypeByName("Category");
$objSearch = new clsSearchResults("Category","clsCategory");
$length = $objConfig->Get('Search_MinKeyword_Length');
if(strlen($keywords))
{
$performSearch = false;
$isExact = (substr($keywords, 0, 2) == '\"' && substr($keywords, strlen($keywords) - 2, 2) == '\"');
if ($isExact) {
$performSearch = (strlen(trim(str_replace('\"', '', $keywords))) >= $length);
}
else {
$key_arr = explode(' ', $keywords);
/*foreach($key_arr as $value) {
if (strlen(str_replace("+", "", $value)) < $length || strlen(str_replace("-", "", $value)) < $length) {
$keywords = str_replace($value, '', $keywords);
//$keywords = str_replace($value, '', $keywords);
}
}
//$keywords = str_replace(' ', ' ', $keywords);
//$keywords = str_replace('\"', '', $keywords);
*/
$tmp_keywords = str_replace("+", "", $keywords);
$tmp_keywords = str_replace("-", "", $tmp_keywords);
$performSearch = (strlen($tmp_keywords) >= $length);
}
if ($performSearch) {
$objSearchList = new clsSearchLogList();
$objSearchList->UpdateKeyword($keywords,0);
$objSearch->SetKeywords($keywords);
$objSearch->AddSimpleFields('c');
if (is_numeric($objConfig->Get("SearchRel_Pop_category"))) {
$objSearch->PctPop = ($objConfig->Get("SearchRel_Pop_category")/100);
}
if (is_numeric($objConfig->Get("SearchRel_Keyword_category"))) {
$objSearch->PctRelevance = ($objConfig->Get("SearchRel_Keyword_category")/100);
}
if (is_numeric($objConfig->Get("SearchRel_Rating_category"))) {
$objSearch->PctRating = ($objConfig->Get("SearchRel_Rating_category")/100);
}
//echo "Searching On $keywords<br>\n";
$objSearch->PerformSearch(1,$SortOrder,TRUE);
$SearchPerformed = TRUE;
//$objSearch->SetRelevence($type->Get("ItemType"), "CategoryId");
//echo "Finished Setting Category Relevence<br>\n";
}
else {
if(strlen($_GET["Error"])>0)
$var_list["t"] = $_GET["Error"];
$MissingCount = SetMissingDataErrors("m_simplesearch");
$MissingCount++;
setSearchError(lu_keywords_tooshort);
}
}
else
{
if (strlen($_GET["Error"])>0) {
$var_list["t"] = $_GET["Error"];
}
$MissingCount = SetMissingDataErrors("m_simplesearch");
$MissingCount++;
setSearchError('lu_no_keyword');
}
break;
case "m_adv_search":
if ($_GET['type']) {
$modules = Array( 1 => 'In-Portal', 2 => 'In-News',
3 => 'In-Bulletin', 4 => 'In-Link',
11 => 'In-Commerce');
$module = $modules[$_GET["type"]];
}
else {
$module = 0;
}
if( !is_object($objSearchConfig) ) $objSearchConfig = new clsSearchConfigList($module);
switch($_GET["type"])
{
case 1: /* category */
//echo "Searching for categories<br>";
$objAdvSearch = new clsAdvancedSearchResults("Category","clsCategory", $_GET["type"]);
foreach($objSearchConfig->Items as $field)
{
$fld = $field->Get("FieldName");
$Verb = $_POST["verb"][$field->Get("FieldName")];
if(!strlen($Verb) && $field->Get("FieldType")=="boolean")
{
if($_POST["value"][$field->Get("FieldName")]!=-1)
{
$Value = $_POST["value"][$field->Get("FieldName")];
$Verb = "is";
}
}
else
{
$Value = $_POST["value"][$field->Get("FieldName")];
}
switch( $_POST["andor"][$field->Get("FieldName")])
{
case 1:
$Conjuction = "AND";
break;
case 2:
$Conjuction = "OR";
break;
default:
$Conjuction = "";
break;
}
if (strlen($Value) && $Verb=="any")
{
$Verb = 'contains';
}
if(strlen($Value) && strlen($Verb)>0 && $Verb!="any")
{
// echo "Adding CAT SearchField: [".$field->Get("TableName")."]; [".$field->Get("FieldName")."]; [$Verb]; [$Value]; [$Conjuction]<br>";
$objAdvSearch->AddAdvancedField($field->Get("TableName"),$field->Get("FieldName"),$Verb,$Value,$Conjuction, 'c');
}
}
$objAdvSearch->PerformSearch(1,NULL,TRUE);
break;
}
break;
case "m_id":
echo $Action.":".$DownloadId;
die();
break;
case "m_simple_subsearch":
$keywords = $_POST["keywords"];
$type = $objItemTypes->GetTypeByName("Category");
$objSearch = new clsSearchResults("Category","clsCategory");
$length = $objConfig->Get('Search_MinKeyword_Length');
if(strlen($keywords))
{
$performSearch = false;
$isExact = (substr($keywords, 0, 1) == '"' && substr($keywords, strlen($keywords) - 1, 1) == '"');
if ($isExact) {
$performSearch = (strlen(trim(str_replace('\"', '', $keywords))) >= $length);
}
else {
$key_arr = explode(' ', $keywords);
/*foreach($key_arr as $value) {
if (strlen($value) < $length) {
$keywords = str_replace(' '.$value, '', $keywords);
$keywords = str_replace($value.' ', '', $keywords);
}
}*/
//$keywords = str_replace(' ', ' ', $keywords);
$tmp_keywords = str_replace("+", "", $keywords);
$tmp_keywords = str_replace("-", "", $tmp_keywords);
$performSearch = (strlen($tmp_keywords) >= $length);
}
if ($performSearch) {
$objSearchList = new clsSearchLogList();
$objSearchList->UpdateKeyword($keywords,0);
$objSearch->SetKeywords($keywords);
$objSearch->AddSimpleFields('c');
if (is_numeric($objConfig->Get("SearchRel_Pop_category"))) {
$objSearch->PctPop = ($objConfig->Get("SearchRel_Pop_category")/100);
}
if (is_numeric($objConfig->Get("SearchRel_Keyword_category"))) {
$objSearch->PctRelevance = ($objConfig->Get("SearchRel_Keyword_category")/100);
}
if (is_numeric($objConfig->Get("SearchRel_Rating_category"))) {
$objSearch->PctRating = ($objConfig->Get("SearchRel_Rating_category")/100);
}
$SearchResultIdList = $objSearch->Result_IdList();
if(count($SearchResultIdList)>0)
{
$objSearch->PerformSearch(1,$SortOrder, TRUE,$SearchResultIdList);
//$objSearch->SetRelevence($type->Get("ItemType"), "CategoryId");
}
$SearchPerformed = TRUE;
}
else {
$MissingCount = SetMissingDataErrors("m_simplesearch");
$MissingCount++;
setSearchError('lu_keywords_tooshort');
}
}
else {
$MissingCount = SetMissingDataErrors("m_simplesearch");
$MissingCount++;
setSearchError('lu_no_keyword');
}
break;
}
function setSearchError($error_phrase)
{
$GLOBALS['FormError']['m_simplesearch']['keywords'] = language($error_phrase);
$GLOBALS['objSession']->SetVariable('search_error', $error_phrase);
}
?>
Property changes on: branches/unlabeled/unlabeled-1.73.2/kernel/frontaction.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.73
\ No newline at end of property
+1.73.2.1
\ No newline at end of property

Event Timeline