$res = ADMIN_FILE . "?dpt=custord&sub=subscribers"; if (isset($_GET["offset"])) { $res .= "&offset=" . $_GET["offset"]; } if (isset($_GET["show_all"])) { $res .= "&show_all=" . $_GET["show_all"]; } return $res; } if (isset($_GET["unsub"])) { // unsubscribe registered user if (CONF_BACKEND_SAFEMODE) { //this action is forbidden when SAFE MODE is ON Redirect(_getUrlToUnsub() . "&safemode=yes"); } subscrUnsubscribeSubscriberByEmail($_GET["unsub"]); if (!session_is_registered('SUBSCRIBE_MESSAGE')) { session_register('SUBSCRIBE_MESSAGE'); } $_SESSION['SUBSCRIBE_MESSAGE'] = array('Message' => str_replace('{*EMAIL*}', base64_decode($_GET["unsub"]), ADMIN_SUBSCRIPTIONS_OK_EMAIL_DELETED), 'MessageCode' => 1); Redirect(_getUrlToUnsub()); } if (isset($_GET["post_sub"])) { if (CONF_BACKEND_SAFEMODE) { Redirect(_getUrlToNavigate() . "&safemode=yes"); } SendNewsMessage($_POST["title_sub"], $_POST["message_sub"]); } $callBackParam = array(); $subscribers = array(); $count = 0;
function regUpdateContactInfo($old_login, $login, $cust_password, $Email, $first_name, $last_name, $subscribed4news, $additional_field_values) { db_query("update " . CUSTOMERS_TABLE . " set " . " Login = '******', " . " cust_password = '******', " . " Email = '" . xToText($Email) . "', " . " first_name = '" . xToText(trim($first_name)) . "', " . " last_name = '" . xToText(trim($last_name)) . "', " . " subscribed4news = " . (int) $subscribed4news . " " . " where Login='******'"); foreach ($additional_field_values as $key => $val) { SetRegField($key, $login, $val["additional_field"]); } if (!strcmp($old_login, $login)) { //update administrator login (core/config/connect.inc.php) db_query("update " . CUSTOMERS_TABLE . " set Login='******' where Login='******'"); } $customerID = regGetIdByLogin($login); if ($subscribed4news) { subscrAddRegisteredCustomerEmail($customerID); } else { subscrUnsubscribeSubscriberByEmail(base64_encode($Email)); } }