Example #1
0
     }
     if (isset($_POST["subscribed4news_submit"])) {
         if (CONF_BACKEND_SAFEMODE) {
             Redirect(ADMIN_FILE . "?dpt=custord&sub=custlist&customer_details=contact_info&customerID=" . $_GET["customerID"] . "&encodedReturnUrl=" . $_GET["encodedReturnUrl"] . "&safemode=yes");
         }
         regSetSubscribed4news($_GET["customerID"], isset($_POST["subscribed4news"]) ? 1 : 0);
     }
     if (isset($_POST["custgroupID"])) {
         if (CONF_BACKEND_SAFEMODE) {
             Redirect(ADMIN_FILE . "?dpt=custord&sub=custlist&customer_details=contact_info&customerID=" . $_GET["customerID"] . "&encodedReturnUrl=" . $_GET["encodedReturnUrl"] . "&safemode=yes");
         }
         regSetCustgroupID($_GET["customerID"], $_POST["custgroupID"]);
     }
     $log1 = regGetLoginById($_GET["customerID"]);
     $customerInfo = regGetCustomerInfo2($log1);
     $reg_fields_values = GetRegFieldsValues($log1);
     $customer_groups = GetAllCustGroups();
     $smarty->assign("customer_groups", $customer_groups);
     $smarty->assign("reg_fields_values", $reg_fields_values);
     $smarty->assign("customerInfo", $customerInfo);
 }
 if ($_GET["customer_details"] == "address_book") {
     $log1 = regGetLoginById($_GET["customerID"]);
     $addresses = regGetAllAddressesByLogin($log1);
     for ($i = 0; $i < count($addresses); $i++) {
         $addresses[$i]["addressStr"] = regGetAddressStr($addresses[$i]["addressID"]);
     }
     $defaultAddressID = regGetDefaultAddressIDByLogin($log1);
     $smarty->assign("addresses", $addresses);
     $smarty->assign("defaultAddressID", $defaultAddressID);
 }
Example #2
0
function regGetContactInfo($login, &$cust_password, &$Email, &$first_name, &$last_name, &$subscribed4news, &$additional_field_values)
{
    $q = db_query("select customerID, cust_password, Email, first_name, last_name, " . " subscribed4news, custgroupID, addressID  from " . CUSTOMERS_TABLE . " where Login='******'");
    $row = db_fetch_row($q);
    $cust_password = cryptPasswordDeCrypt($row["cust_password"], null);
    $Email = $row["Email"];
    $first_name = $row["first_name"];
    $last_name = $row["last_name"];
    $subscribed4news = $row["subscribed4news"];
    $additional_field_values = GetRegFieldsValues($login);
}