<?php
/**
 * HTML Change Password Form
 *
 * PHP version 7.3
 *
 * @package        SMS
 * @version        Release 1.0.0
 * @create_by      Mohammad aljaouni
 * @create_date    17-08-2020
 * @edited_by
 * @last_edit_date
 * @todo           Nothing
 */
ob_start();
session_start();
$chain = "AWdrh78y892Djk*^523*%$#ghgHGHia&%$*)AsfdsLJnLaad";
include("validateLogin.php");
include("includeInformation.php");
include("header.php");
//Get User Account & Permissions
$queryAccount = "SELECT account, sender, userKey, showSender, specifyNumber, number, accountOriginal, allowChangeSender";
$queryAccount.= " FROM $userLogin";
$queryAccount.= " WHERE id=$_SESSION[userId]";
$resultAccount = mysqli_query($conn, $queryAccount);
$rowAccount = mysqli_fetch_array($resultAccount);
$msgUniqueMd5 = md5(time());
$_SESSION["msgUnique"]=$msgUniqueMd5;
?>
<link rel="stylesheet" type="text/css" href="../JScalendar/jquery-ui-timepicker-addon.css" />
<link rel="stylesheet" media="all" href="../JScalendar/jquery-ui.css" />
<?php if($_SESSION["language"]==1){
    ?>
    <script type="text/javascript" src="../JScalendar/jquery-ui.min.Ar.js"></script>
    <script type="text/javascript" src="../JScalendar/jquery-ui-timepicker-addon-Ar.js"></script>
    <?php
}else{
    ?>
    <script type="text/javascript" src="../JScalendar/jquery-ui.min.js"></script>
    <script type="text/javascript" src="../JScalendar/jquery-ui-timepicker-addon.js"></script>
    <?php
}
?>
<script language="javascript" type="text/javascript">
function checkIntergetType(val)
{
	var string = "1234567890";	
	for(var i=0;i<val.length;i++)
	{
		if(string.indexOf(val.charAt(i)) == -1)
		return false;
	}
	return true;
}
function textFilter(strText)
{
	str = "،؛؟ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيـًٌٍَُِّْ!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~©®÷×§ ";
	rejectChar = "";
	for(i=0; i<strText.length; i++)
	{
		if(str.indexOf(strText.charAt(i)) == -1 && strText.charCodeAt(i)!=10 && strText.charCodeAt(i)!=13)
			rejectChar +=strText.charAt(i)+" ";
	}
	if(rejectChar.length>0)		  
	{
		alert(rejectChar+'   <?php echo $sendMsgLBL["symbolsNotAllowed"];?> ');
		return 1;
	}
}
function validate()
{   
	if(document.formMsg.userSender.value == "")
  	{
		//أدخل إسم المرسل
  		alert('<?php echo $sendMsgLBL["insertSenderName"];?>');
  		document.formMsg.userSender.focus();
  		return false;
  	} 	
	var sender = document.formMsg.userSender.value;
    if(checkIntergetType(sender))
    {
	    if(sender.substring(0,2)=="00")
		sender=sender.substring(2);
		if(sender.substring(0,1)=="0")
	    sender=sender.substring(1);
		if (sender.length > 12)
		{
			alert("<?php echo $sendMsgLBL["senderNameLength"]?>");
			return false;
		}
	}
	else
	{
		if(unicode(document.formMsg.userSender.value)==1)
		{
			//اسم المرسل بالغة الانجليزية
			alert('<?php echo $sendMsgLBL["senderNameEnglish"]?>')
			return false;
		}
		if (sender.length > 11)
		{
			alert("<?php echo $sendMsgLBL["senderNameLength"]?>");
			return false;
		}
	}
	if(document.formMsg.msg.value == "")
	{
		//يجب عليك إدخال نص الرسالة
		alert('<?php echo $sendMsgLBL["insetTextMsg"];?>')
		document.formMsg.msg.focus();
		return false;
	}
	msgTemp = "";
	for(i=0; i<document.formMsg.msg.value.length; i++)
	{
		if(document.formMsg.msg.value.charCodeAt(i)=="1632")
			msgTemp += "0";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1633")
			msgTemp += "1";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1634")
			msgTemp += "2";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1635")
			msgTemp += "3";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1636")
			msgTemp += "4";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1637")
			msgTemp += "5";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1638")
			msgTemp += "6";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1639")
			msgTemp += "7";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1640")
			msgTemp += "8";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1641")
			msgTemp += "9";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1785")
			msgTemp += "9";
		else if(document.formMsg.msg.value.charCodeAt(i)=="1642")
			msgTemp += "%";			
		else
			msgTemp +=document.formMsg.msg.value.charAt(i);
	}
	document.formMsg.msg.value =msgTemp;
	for(i=0; i<document.formMsg.msg.value.length; i++)
	{
		if(document.formMsg.msg.value.charAt(i) =='ـ')
		{
			if(document.formMsg.confirmMsg.value == '0')
			{
				//الحرف التالي (شفت و ت) قد لا يصل بشكل صحيح على جميع أنواع الجوالات
				alert('<?php echo $sendMsgLBL["lettersNotSend"];?>');
				document.formMsg.confirmMsg.value = '1';
				document.formMsg.msg.focus();
				return false;
			}
		}
	}
	 strLen = 0;
    msgLen = 0;
    strText = document.formMsg.msg.value;
    for(i=0; i<strText.length; i++)
    {
        if(strText.charCodeAt(i)!=13)
            strLen++;
    }
    document.formMsg.numChars.value = strLen;
    numChar = strLen;
    if (unicode(document.formMsg.msg.value))
    {
        if(numChar <= 70)
            msgLen  = 1;
        else
            msgLen  = Math.ceil(numChar/67);
    }
    else
    {
        if(numChar <= 160)
            msgLen = 1;
        else
            msgLen = Math.ceil(numChar/153);
    }
	return true;
}
function unicode(strText)
{
	str = "دجحخهعغفقثصضطكمنتالبيسشظزوةىلارؤءئإلإألأآلآ،؛؟ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيـًٌٍَُِّْ";
 	for (i=0; i<strText.length; i++)
		if (str.indexOf(strText.charAt(i)) != -1)
			return 1;
 	return 0;
}

function charPlus()
{
	strLen = 0;
	strText = document.formMsg.msg.value;
	for(i=0; i<strText.length; i++)
	{
		if(strText.charCodeAt(i)!=13)
			strLen++;
	}
	document.formMsg.numChars.value = strLen;
	numChar = strLen;	
	if (unicode(document.formMsg.msg.value))
	{
		document.formMsg.unicode1.value = 1;
		if(numChar <= 70)
			document.formMsg.numMsgs.value = 1;
		else
			document.formMsg.numMsgs.value = Math.ceil(numChar/67);
	}
	else
	{
		document.formMsg.unicode1.value = 0;
		if(numChar <= 160)
			document.formMsg.numMsgs.value = 1;
		else
			document.formMsg.numMsgs.value = Math.ceil(numChar/153);
	}
}


$(document).ready(function(){
	$('#calendar').datetimepicker();
	
	$("#process").click(function(){
		if (!validate())
		{
			return false;
		}
		var userSender = $('#userSender').val();
		var msg = $('#msg').val();
		if (userSender !="" && msg !="")
		{
			$("#reportResult").html('');							 
			senderName = $('#userSender').val();
			var values = new Array();
			$.each($("input:checkbox[id='categoryId[]']:checked"), function(){
				values.push($(this).val());
			});	
			var catSelected = values;
			var delNum = 'off';
			if($("#deleteNum").is(':checked'))
				delNum='on';
			$.post("reportSendMsg.php", { 
				msg: $("#msg").val(),
				numbers: $("#numbers").val(),
				userSender: senderName,							
				category: ""+catSelected,
				deleteNum: delNum 
			},
			function(data){
				$("#reportResult").html(data);	
				$('#reportSendModal').modal('show');				 
			});
		}
		else
		{
			//يجب ادخال اسم المرسل و نص الرسالة المرسلة
			alert("<?php echo $sendMsgLBL["enterSenderAndMsg"];?>");
			return false;
		} 
	});
	
	$("#saveMsg").click( function(){
		strLen = 0;
		numMsgseN = 0;
		
		if($('#titleId').val() == '')
		{
			//ادخل عنوان الرسالة
			alert("<?php echo $sendMsgLBL["enterMsgTitle"];?>");
			$('#titleId').focus();
			return false;
		}
		strText = document.formMsg.msg.value;
		if(strText == "")
		{
			//يجب عليك إدخال نص الرسالة
			alert('<?php echo $sendMsgLBL["insetTextMsg"];?>');
			$('#saveMsgModal').modal('hide');
			document.formMsg.msg.focus();
			return false;
		}
		msgTemp = "";
		for(i=0; i<document.formMsg.msg.value.length; i++)
		{
			if(document.formMsg.msg.value.charCodeAt(i)=="1632")
				msgTemp += "0";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1633")
				msgTemp += "1";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1634")
				msgTemp += "2";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1635")
				msgTemp += "3";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1636")
				msgTemp += "4";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1637")
				msgTemp += "5";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1638")
				msgTemp += "6";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1639")
				msgTemp += "7";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1640")
				msgTemp += "8";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1641")
				msgTemp += "9";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1785")
				msgTemp += "9";
			else if(document.formMsg.msg.value.charCodeAt(i)=="1642")
				msgTemp += "%";			
			else

				msgTemp +=document.formMsg.msg.value.charAt(i);
		}
		document.formMsg.msg.value = msgTemp;
		for(i=0; i<document.formMsg.msg.value.length; i++)
		{
			if(document.formMsg.msg.value.charAt(i) =='ـ')
			{
				if(document.formMsg.confirmMsg.value == '0')
				{
					//الحرف التالي (شفت و ت) قد لا يصل بشكل صحيح على جميع أنواع الجوالات
					alert('<?php echo $sendMsgLBL["lettersNotSend"];?>');
					document.formMsg.confirmMsg.value = '1';
					$('#saveMsgModal').modal('hide');
					document.formMsg.msg.focus();
					return false;
				}
			}
		}
		/*
		if(textFilter(document.formMsg.msg.value)==1)
		{
			$('#saveMsgModal').modal('hide');
			document.formMsg.msg.focus();
			return false;
		}
		*/
		strText = document.formMsg.msg.value;
		for(i=0; i<strText.length; i++)
		{
			if(strText.charCodeAt(i)!=13)
				strLen++;
		}
		numCharN = strLen;
		if (unicode(document.formMsg.msg.value))
		{
			numMsgseN = 1;
			if(numCharN <= 70)
				numMsgseN = 1;
			else
				numMsgseN = Math.ceil(numCharN/67);
		}
		else
		{
			numMsgseN = 0;
			if(numCharN <= 160)
				numMsgseN = 1;
			else
				numMsgseN = Math.ceil(numCharN/153);
		}
		var titleIdMsg = $('#titleId').val();
		$.post("saveMsgs.php",{msg:$("#msg").val(),numChars:numCharN,numMsgs:numMsgseN,title:titleIdMsg},function (res){
			if(res == 1)
			{
				//تمت عملية تخزين الرسالة في صندوق الرسائل بنجاح
				alert("<?php echo $sendMsgLBL["msgBoxSaveDone"];?>");
				$('#saveMsgModal').modal('hide');
			}
			if(res == 2)
			{
				//لم تتم عملية الاضافة بنجاح ... اعد المحاولة مرة اخرى
				alert("<?php echo $sendMsgLBL["msgBoxSaveFail"];?>");
				$('#saveMsgModal').modal('hide');
			}
			if(res == 0)
			{
				//لم تتم عملية الاضافة بنجاح ... البيانات مفقودة
				alert("<?php echo $sendMsgLBL["addFailNoData"];?>");
				$('#saveMsgModal').modal('hide');
			}
		});
	});
	
	
});
/*function clock()
{
	$.post("timeDateServer.php",function(res){																																																											
		$("#TimeOnTheServer").text(res);
	})
	setTimeout('clock()',1000); 
}
clock();*/
$(document).ready(function(){			
	$("#msgReady").change(function(){				
		$.post("getReadyMsg.php",{ id: $("#msgReady").val()}, function(data){  
		  $("#msg").text(''); 
		  data = jQuery.trim(data); 				  
		  $("#msg").text(data);
		  charPlus();
		});
	});
});
</script>
<!--  catgoriesNumbersModal -->
<form  name="formSearch" action="chargeDone.php" method="post" style="margin:0px">
<div class="modal fade modal-fullscreen " style="z-index:10000;padding-<?php echo $align;?>:0px" id="catgoriesNumbersModal" tabindex="-1" role="dialog" aria-labelledby="searchModalTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
     <div class="modal-content text-right">
        <div class="modal-header modal-header-primary">
           <h5 class="modal-title" id="searchModalTitle"><?php echo $sendMsgLBL["catsNumbers"];?></h5>
           <button type="button" class="close slidedown" data-dismiss="modal" aria-label="Close">
           <span aria-hidden="true">&times;</span>
           </button>
        </div>
        <div class="modal-body" style="text-align: <?php echo $align;?>;">
            <span id="reportResultNumber"></span>
        </div>
        <div class="modal-footer">
           <button type="button" class="btn bg-danger btn-flat text-white m-1" data-dismiss="modal"><?php echo $button["close"];?></button>
        </div>
     </div>
  </div>
</div>

</form>
<!--  catgoriesNumbersModal -->

<!--  saveMsgModal -->
<div class="modal fade modal-fullscreen " style="z-index:10000;padding-<?php echo $align;?>:0px" id="saveMsgModal" tabindex="-1" role="dialog" aria-labelledby="searchModalTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
     <div class="modal-content text-right">
        <div class="modal-header modal-header-primary">
           <h5 class="modal-title" id="searchModalTitle"><?php echo $sendMsgLBL["saveMsg"];?></h5>
           <button type="button" class="close slidedown" data-dismiss="modal" aria-label="Close">
           <span aria-hidden="true">&times;</span>
           </button>
        </div>
        <div class="modal-body" style="text-align: <?php echo $align;?>;">
            <div class="form-group" style="margin-bottom: 0px;">
            	<label for="titleId" class="col-form-label myModalLabel"> <?php echo $sendMsgLBL["msgTitle"];?>:</label>
            	<input type="text" class="form-control" name="title" id="titleId">
            </div>
        </div>
        <div class="modal-footer">
           <button type="button" class="btn bg-danger btn-flat text-white m-1" data-dismiss="modal"><?php echo $button["close"];?></button>
           <input type="button" value='<?php echo $button["save"];?>' name="saveMsg" id="saveMsg" class="btn bg-primary btn-flat text-white m-1">
        </div>
     </div>
  </div>
</div>
<!--  saveMsgModal -->

<!-- Start Dashboard page -->
    <!-- start main-content -->
    <div class="main-content">
        <!-- Start Page-content -->
        <div class="page-content">
        <!-- Page-Title -->
        <div class="page-title-box">
            <div class="container-fluid">
                <div class="row align-items-center">
                    <?php echo breadcrumbs(basename($_SERVER['PHP_SELF']));?>
                </div>
            </div>
        </div>
        <?php
		
		$color = "seagreen";
		$result = $resultReport = balanceSMS($userAccount, $passAccount, 1);
		//@list($elem1, $elme2) = explode("/", $result);
		$querySiteAccount = "UPDATE $userLogin SET";
		$querySiteAccount.= " account='$result'";
		$querySiteAccount.= " WHERE id='".$_SESSION["userId"]."'";
		$result2 = mysqli_query($conn, $querySiteAccount);
		$balance = sprintf($sendMsgLBL["balanceHeader"], $result);
		$accountUser = $result;
		if($result <= 0)
			$color = "red";
		
		$resultRyal = balanceSMS($userAccount, $passAccount);
		$balanceRyal = sprintf($sendMsgLBL["balanceHeader2"], $resultRyal);
		?>
        <!-- end page title end breadcrumb -->
        <div class="page-content-wrapper">
            <div class="container-fluid">
                <div class="row justify-content-center align-items-center">
                    <div class="col-sm-12 col-lg-6 ">
                        <div class="card">
                            <div class="card-body table-responsive">
                            <?php
								if(!empty($_GET['sendErrorMsg'])) {
									if($_GET['sendErrorMsg'] == 1)
										echo result(222);
								}
								if(!empty($_GET["res"]))
									echo result($_GET["res"]);
								?>
                                <span class="text-center balanceTitle" style="color:<?php echo $color;?>"><center class="mb-3"><b><?php echo $balanceRyal;?> = <?php echo $balance;?></b></center></span>
                                <form name="formMsg" onsubmit="return validate()" action='sendMsgReports.php' method="post">
								<table border="0" width="100%" cellpadding="3" cellspacing="2" style="margin:0px; border-collapse:collapse">
                                   <tbody>
                                      <!-- START (Sender Managment) --->            
                                      <tr>
                                         <td class="myModalLabel"><?php echo $sendMsgLBL["sender"];?>: </td>
                                        <td>
                                            <?php
                                            	$userActiveArr = array();
                                                $userActive = getSenderAvailability($userAccount);
												if(!empty($userActive)){
													$userActiveArr = explode(",", $userActive);
													$userActiveArr = array_filter($userActiveArr);
												}
                                                ?>
                                                <select name="userSender" id="userSender" class="form-control" style="padding:0px">
                                                    <?php
                                                    foreach ($userActiveArr as $value) {
                                                        ?>
                                                        <option value="<?php echo $value; ?>"><?php echo $value; ?></option>
                                                        <?php
                                                    }
                                                    ?>
                                                </select>
                                       </td>
                                    </tr>
                                      <!-- END (Sender Managment) --->
                                      <!-- START (Numbers Managment) --->
									<?php
                                        $queryCatsAndNums = "SELECT COUNT(`user_number`.`id`) AS counter, `user_number`.`categoryId`, `user_category`.`name` ";
                                        $queryCatsAndNums.= "FROM `user_number`, `user_category` ";
                                        $queryCatsAndNums.= "WHERE `user_number`.`userId`=$_SESSION[userId] AND `user_category`.`id` = `user_number`.`categoryId` ";
                                        $queryCatsAndNums.= "GROUP BY `user_number`.`categoryId` ";
                                        $queryCatsAndNums.= "ORDER BY BINARY `user_category`.`name` ASC";
                                        $resultCatsAndNums = mysqli_query($conn, $queryCatsAndNums);
                                        $numCatsAndNums = mysqli_num_rows($resultCatsAndNums);
                                        if(!empty($numCatsAndNums))
                                        {
                                            ?>
                                    <!-- START (Categories Managment) --->
                                    <tr>
                                        <td	class="myModalLabel" valign="top"><?php echo $sendMsgLBL["catgories"];?>: </td>
                                        <td> 
                                            <table border="0" cellpadding="5" cellspacing="0" style="margin:0px; border-collapse:collapse"  dir="<?php echo $dir;?>">
                                            <?php
                                            $catCounter = 0;
                                            while($rowCatsAndNums = mysqli_fetch_assoc($resultCatsAndNums))
                                            {
                                                if($catCounter == 0)
                                                    echo "<tr>";
                                                ?>
                                                <td style="white-space:nowrap; min-width:150px; text-align:<?php echo $align;?>"><input type="checkbox" id="categoryId[]" value="<?php echo $rowCatsAndNums["categoryId"];?>"> <?php echo $rowCatsAndNums["name"];?> <b dir="<?php echo $dir;?>">[<?php echo $rowCatsAndNums["counter"]?>]</b></td>
                                                <?php
                                                ++$catCounter;
                                                if(fmod($catCounter, 3) == 0)
                                                {
                                                    echo "</tr>";
                                                    $catCounter = 0;
                                                }						
                                            }
                                           if($catCounter != 0)
                                            {
                                                while($catCounter != 3)
                                                {
                                                    echo "<td>&nbsp;</td>";
                                                    ++$catCounter;
                                                }
                                                echo "</tr>";
                                            }?>
                                            </table>
                                       </td>
                                    </tr>
                                      <?php
                                        }
                                     ?>
                                      <?php
										$numberForSend = "";
										if(!empty($_POST['numberId']))
											$numberForSend = $_POST['numberId']; 
										?>
                                      <tr>
                                         <td class="myModalLabel" valign="top"><?php echo $sendMsgLBL["numbers"];?>: </td>
                                         <td><textarea name="numbers" id="numbers" class="form-control"><?php if(!empty($reNumber)){?><?php echo $reNumber?><?php }else{?><?php echo $numberForSend?><?php }?></textarea><br><span style="font-size:12; color:#FF0000"><?php echo $sendMsgLBL["numbersNote"];?></span></td>
                                      </tr>
                            <!-- END (Numbers Managment) --->
                            		<?php
									$msg = '';
									$setCounter = false;
									if(!empty($_POST['msgBoxId']))
									{
										$resultGetMsgBox = mysqli_query($conn, "SELECT * FROM `msgbox` WHERE `id`=$_POST[msgBoxId] AND `userId`=$_SESSION[userId] ");
										$numGetMsgBox = mysqli_num_rows($resultGetMsgBox);
										if(!empty($numGetMsgBox))
										{
											$rowGetMsgBox = mysqli_fetch_assoc($resultGetMsgBox);
											$msg = $rowGetMsgBox['msg'];
											$numChars=$rowGetMsgBox['numChars'];
											$numMsgs=$rowGetMsgBox['numMsgs'];
											$setCounter = true;
										}
									}
									?> 
                                      <tr>
                                         <td class="myModalLabel" valign="top"><?php echo $sendMsgLBL["message"];?>: </td>
                                         <td>
                                            <table border="0" width="100%" cellpadding="2" cellspacing="0" style="margin:0px; border-collapse:collapse">
                                               <tbody>
                                                  <tr>
                                                     <td style="width:500px"><textarea class="form-control" onkeydown="javascript:charPlus()" onkeyup="javascript:charPlus()" name="msg" id="msg" rows=4><?php if(!empty($reMsg)){?><?php echo $reMsg?><?php }else{?><?php echo $msg?><?php }?></textarea></td>
                                                  </tr>
                                                  <tr>
                                                     <td valign="bottom" align="<?php echo $align;?>" class="charsCount" >
                                                     <span style="font-weight:bold; padding-top:10px"><?php echo $sendMsgLBL["charCount"];?> : </span>&nbsp; 
                                                     <input class="form-control" readonly value="0" name="numChars" style="width:60px;background-color: #eee;">&nbsp; 
                                                     <span style="font-weight:bold; padding-top:10px"><?php echo $sendMsgLBL["msgCount"];?> : </span> &nbsp; 
                                                     <input class="form-control" readonly value="0" name="numMsgs" style="width:60px;background-color: #eee;">
                                                     </td>
                                                  </tr>
                                               </tbody>
                                            </table>
                                         </td>
                                      </tr>
                                      <!-- END (Message Managment) --->
                                      <tr>
                                         <td></td>
                                         <td valign="top" style="white-space: nowrap;"><input type="checkbox" id="deleteNum" checked="checked" dir="<?php echo $dir;?>"> <b><?php echo $sendMsgLBL["delNum"];?></b></td>
                                      </tr>
                                      <tr>
                                         <td align="left" colspan="2">
                                            <hr>
                                            <input class="btn btn-success waves-effect waves-light" type="button" value="<?php echo $sendMsgLBL["send"];?>" name="send" id="process">
                                            <input class="btn btn-info  waves-effect waves-light" type="reset" value="<?php echo $sendMsgLBL["clear"];?>">
                                         </td>
                                      </tr>
                                   </tbody>
                                </table>
                               <input type="hidden" name="accountUser" value="<?php echo $accountUser;?>">
                                <input type="hidden" value="0"  name="unicode1">
                                <input type="hidden" value="<?php echo $_SESSION['userId'];?>" name="userId2">
                                <input type="hidden" name="userSenderSMS" value="<?php echo $rowAccount['sender'];?>">
                                <input type="hidden" name="selectArchives" value="1" >
                                <input type="hidden" name="confirmMsg" value="0">
                                
                                
                                
                                <!--  reportSendModal -->
                                <div class="modal fade modal-fullscreen " style="z-index:10000;padding-<?php echo $align;?>:0px" id="reportSendModal" tabindex="-1" role="dialog" aria-labelledby="searchModalTitle" aria-hidden="true">
                                  <div class="modal-dialog modal-dialog-centered" role="document">
                                     <div class="modal-content text-right">
                                        <div class="modal-header modal-header-primary">
                                           <h5 class="modal-title" id="searchModalTitle"><?php echo $sendMsgLBL["reportSendMsg"];?></h5>
                                           <button type="button" class="close slidedown" data-dismiss="modal" aria-label="Close">
                                           <span aria-hidden="true">&times;</span>
                                           </button>
                                        </div>
                                        <div class="modal-body" style="text-align: <?php echo $align;?>;">
                                            <span id="reportResult"></span>
                                        </div>
                                        
                                     </div>
                                  </div>
                                </div>
                                <!--  reportSendModal -->
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- end row -->
            </div>
            <!-- end container-fluid -->
        </div>
        <!-- end page-content-wrapper -->
    </div>
        <!-- End Page-content -->
</div>
    <!-- end main content -->
<!-- End Dashboard page -->
<?php if($setCounter):?>
<script language="javascript">
charPlus();
</script>
<?php endif;?>
<?php
include("footer.php");
ob_end_flush();
?>
