<?php
session_start();
//include '../Control/sales.php';
class nextactionctrl{
public $companyname;
public $adminemailid;
public $createby;
public $createtype;
     function __construct() {
     }
    

}
?>

<?php
if(isset($_POST['insertnextactionmultiple'])){  
    $na_assign=$_POST['na_assign'];
    $na_descr=$_POST['insertnextactionmultiple'];
    $na_selectedoption=$_POST['na_selectedoption'];
    $na_date=$_POST['na_date'];
    $companyname=$_SESSION['companyname'];
    $adminemailid=$_SESSION['companymailid'];
    $createby=$_SESSION['emailid'];
    $createtype=$_SESSION['employeetype'];
    require_once ('../Model/nextaction.php');
    $dbobj=new nextactiondb();
    date_default_timezone_set("Asia/Kolkata");
    $na_c_datetime=date("Y-m-d H:i:s");
    $cont=$_POST['cont'];
    $cont_array=array();
    $cont_array=explode("@#", $cont);
    $na_time="00:00";
    if($na_date==""){
        $na_date="0000-00-00";
    }
    for($i=0;$i<count($cont_array);$i++){
        $contid=$cont_array[$i];
        $result1=$dbobj->sales_insert_nextaction($companyname, $contid, $na_assign, $na_descr, $na_selectedoption, $na_date, $na_time, $na_c_datetime, $createby, $createtype);  
    print_r($result1);
        
    }
    return $result1;
}
?>