'._('A verification email has been sent to your main login email address with a confirmation link to complete the verification. Please click the link to complete the verification, then refresh this page and this message should disappear.').'
'._('It is necessary to verify your main login email address for various reasons, one of them is to enable password reset emails to be sent to you should you forget your password in future.').'
'._('Your login email address is still pending verification. Please click the link in the verification email you received from Amazon to complete the verification, then refresh this page and this message should disappear.').'
'._('It is necessary to verify your main login email address for various reasons, one of them is to enable password reset emails to be sent to you should you forget your password in future.').'
';
}
?>
0)
{
echo '
'._('ID').'
'._('Brands').'
'._('Quick links').'
'._('Sending limits').'
'._('Used').'
'._('Edit').'
'._('Delete').'
';
while($row = mysqli_fetch_array($r))
{
$id = $row['id'];
$title = $row['app_name'];
$from_email = explode('@', $row['from_email']);
$get_domain = $from_email[1];
$allocated_quota = $row['allocated_quota'];
$current_quota = $row['current_quota'];
$day_of_reset = $row['day_of_reset'];
$month_of_next_reset = $row['month_of_next_reset'];
$year_of_next_reset = $row['year_of_next_reset'];
$brand_logo_filename = $row['brand_logo_filename'];
$no_expiry = $row['no_expiry'];
//Brand logo
if($brand_logo_filename=='') $logo_image = 'https://www.google.com/s2/favicons?domain='.$get_domain;
else $logo_image = get_app_info('path').'/uploads/logos/'.$brand_logo_filename;
//Check if limit needs to be reset
$today_unix_timestamp = time();
$brand_monthly_quota = $allocated_quota;
if($brand_monthly_quota!=-1)
{
//Date today
$day_today = strftime("%e", $today_unix_timestamp);
$month_today = strftime("%b", $today_unix_timestamp);
$year_today = strftime("%Y", $today_unix_timestamp);
//Find the number of the last day of this month
$no_of_days_this_month = cal_days_in_month(CAL_GREGORIAN, strftime("%m", $today_unix_timestamp), $year_today);
$brand_limit_resets_on = $day_of_reset>$no_of_days_this_month ? $no_of_days_this_month : $day_of_reset;
//Get UNIX timestamp of 'date today' and 'date of next reset' for comparison
$date_today_unix = strtotime($day_today.' '.$month_today.' '.$year_today);
$date_on_reset_unix = strtotime($brand_limit_resets_on.' '.$month_of_next_reset.' '.$year_of_next_reset);
//If date of reset has already passed today's date, reset current limit to 0
if($date_today_unix>=$date_on_reset_unix)
{
//If today's 'day' is passed 'day_of_reset', +1 month for next reset's month
if($day_today >= $brand_limit_resets_on) $plus_one_month = '+1 month';
//Prepare day, month and year of next reset
$month_next_unix = strtotime('1 '.$month_today.' '.$year_today.' '.$plus_one_month);
$month_next = strftime("%b", $month_next_unix);
$year_next = strftime("%Y", $month_next_unix);
//If brand limits is set to 'No expiry'
if(!$no_expiry)
{
//Reset current limit to 0 and set the month_of_next_reset & year_of_next_reset to the next month
$q2 = 'UPDATE apps SET current_quota = 0, month_of_next_reset = "'.$month_next.'", year_of_next_reset = "'.$year_next.'" WHERE id = '.$id;
$r2 = mysqli_query($mysqli, $q2);
if($r2)
{
//Set $current_quota to 0 since current_quota has been reset
$current_quota = 0;
}
}
}
}
//Prepare numbers
if($allocated_quota==-1)
{
$allocated_quota = '∞';
$current_quota = '∞';
$limit_type = '';
}
else
{
$allocated_quota = number_format($allocated_quota);
if($current_quota>$row['allocated_quota']) $current_quota = ''.number_format($current_quota).'';
else $current_quota = ''.number_format($current_quota).'';
$limit_type = $no_expiry ? 'no expiry' : 'monthly';
}
//Get last campaign report link
$last_campaign_id = get_last_campaign_data($id, 'id');
$last_campaign_report_link = $last_campaign_id==0 ? get_app_info('path').'/app?i='.$id : get_app_info('path').'/report?i='.$id.'&c='.$last_campaign_id;
echo '
'._('Let\'s just say you own this company called Apple Inc and you have several products under it eg. Mac, iPhone, iPad etc. These several "child" products are what we refer to as \'brands\'.').'
'._('Another example, if you have a company or business with different clients and you want to group them separately, you can create a \'brand\' for each.').'
'._('Once you\'ve created a brand, you can then create email campaigns, templates, lists, import subscribers or blacklists, setup autoresponders, perform list segmentation etc in each brand you\'ve created.').'
'._('If you have clients that you want to provide email marketing services for, you can generate a set of login credentials for each brand, set access privileges, monthly limits, cost per email etc, then send the login credentials to your clients to login and send newsletters on their own.').'