<?php
session_start();
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj = new my_class();

$eng_sms_max_part = 0;
$ban_sms_max_part = 0;
foreach($obj->View_colmn_By_Cond("_sms_part_allocation_setup","_sms_type,_sms_part_no","_status='A'") as $sms_part_setup_info){
	if($sms_part_setup_info['_sms_type']=='E'){
		$eng_sms_max_part = $sms_part_setup_info['_sms_part_no'];
	}
	else{
		$ban_sms_max_part = $sms_part_setup_info['_sms_part_no'];
	}
}
$eng_char_count = 160;
if($eng_sms_max_part > 1){
	$eng_char_count = (160*$eng_sms_max_part) - (7*$eng_sms_max_part);
}
$ban_char_count = 70;
if($ban_sms_max_part > 1){
	$ban_char_count = (70*$ban_sms_max_part) - (3*$ban_sms_max_part);
}
?>

<div class="widget-box ui-sortable-handle">
	<div class="widget-header widget-header-large">
		<h4 class="widget-title" style="color: red;">SMS Rules</h4>
	</div>
	<div class="widget-body">
		<div class="widget-main">
			<p class="alert alert-danger" style="font-size: 16px;">
				<b>SMS size:</b> <br/> <b>English SMS should be within <?php echo $eng_sms_max_part; ?> message(s), Maximum <?php echo $eng_char_count; ?> characters</b><br/>
				<b>Bangla SMS should be within <?php echo $ban_sms_max_part; ?> message(s), Maximum <?php echo $ban_char_count; ?> characters</b></p>
			<p class="alert alert-danger" style="font-size: 16px;">Use only English or only Bangla language to write the SMS</p>
			<p class="alert alert-danger" style="font-size: 16px;">If you use both languages together the SMS will be considered as Bangla SMS</p>
		</div>
	</div>
</div>