Sindbad~EG File Manager

Current Path : /home/numerotech/www/livemt2023.aios-scientificcommittee.org/app/controllers/
Upload File :
Current File : //home/numerotech/www/livemt2023.aios-scientificcommittee.org/app/controllers/PrintController.php

<?php

class PrintController extends BaseController {

/*Navaneeth - 2018-jan-06*/
/*PrintController print program sheet */
  public function getPrint()
  {
  		$hall_id= Input::get("hall_id");
  		$starts_by = Input::get("date");

      $hall_id =  intval($hall_id) >0  ?$hall_id : null; 


  	    $result = Abstracts::usp_get_abstracts_print(null,null,null,null,null,null,2,null,null,"order by starts_by",null,null,null,$hall_id,$starts_by,null);

         $date_hall = [];
        foreach ($result["abstracts"] as $key => $value) 
        {
            $date_hall[]=$value->hall_name; 
          // or
           //array_push($date_hall,date('d/m/Y |',strtotime($value->starts_by)).$value->hall_name);
        }
        $date_hall=array_unique($date_hall);

        asort($date_hall);

        $print_abstracts = [];
        foreach ($result["abstracts"] as $key => $value)
        {
          $print_abstracts[$value->hall_name][]= $value; 
        }

        // var_dump($result);
        // exit();
        if(empty($result["abstracts"]))
        {
          return Redirect::to("/bo/print/createprint")->with('msgError','NO RECORDS FOUND');
        }
        else
        {
          return View::make("backoffice/print/print_hall_ps")->with('date_hall',$date_hall)->with('result',$print_abstracts);
        }

  }

  public function createPrint()
  {

  	$halls_lists  = Halls::lists('name','hall_id');
  	return View::make("backoffice/print/hall_ps")->with('halls_lists',$halls_lists);
  }

  public function postPrint()
  {
  		$name= Input::get("hall_id");
  		$starts_by = Input::get("date");

  		$halls = new Halls;

		$halls->hall_id = $name;
		$halls->date = $starts_by;

		return Redirect::to('/bo/print/printhallsessions');

  }


  /**** speaker attendance****/

  public function getPrintspeakerattendance()
  {
      $hall_id= Input::has('hall_id') ? Input::get('hall_id') : null ;
      $starts_by = Input::get("date");

      $hall_id =  intval($hall_id) >0  ?$hall_id : null; 

        $result = Abstracts::usp_get_abstracts_print(null,null,null,null,null,null,2,null,null,"order by date(starts_by),hall_id,time(starts_by),isnull(sno),sno,abs_id","order by role_order_no,role,name",null,null,$hall_id,$starts_by,null);
        // var_dump($result);
        // exit();

        $date_hall = [];
        foreach ($result["abstracts"] as $key => $value) 
        {
            $date_hall[]=date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name; 
          // or
           //array_push($date_hall,date('d/m/Y |',strtotime($value->starts_by)).$value->hall_name);
        }
        $date_hall=array_unique($date_hall);
        // var_dump($date_hall);
        // exit();


        $print_abstracts = [];
        foreach ($result["abstracts"] as $key => $value)
        {
          $print_abstracts[date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name][]= $value; 
        }

        $print_authors = [];
        foreach ($result["authors"] as $key => $value) 
        {
         $print_authors[$value->abs_id][$value->role.$value->name.$value->mobile] = $value;
         //or
         // $print_authors[$value->abs_id]["<b>".$value->role."</b>".":".$value->name.",".$value->mobile] = $value;

          
        }

        // $print_authors=array_unique($print_authors[$value->abs_id]);
        // var_dump($print_authors);
        //   exit();

        if(empty($result["abstracts"]))
        {
          return Redirect::to("/bo/print/createprintspeakerattendance")->with('msgError','NO RECORDS FOUND');
        }
        else
        {
          return View::make("backoffice/print/print_speaker_ps")->with('result',$result)
                                                                ->with('print_authors',$print_authors)
                                                                ->with('date_hall',$date_hall)
                                                                ->with('print_abstracts',$print_abstracts);
        }

  }

  public function createPrintspeakerattendance()
  {

    $halls_lists  = Halls::lists('name','hall_id');
    return View::make("backoffice/print/speaker_attendance")->with('halls_lists',$halls_lists);
  }

  //*** FP and VT Judges and presenting author address ***//

  public function createPrintSessionPresenterWorkplace()
  {
    $halls_lists  = Halls::lists('name','hall_id');
    $abs_types  = ['FP'=>'FP','PP'=>'PP','PPP'=>'PPP','HP'=>'HP','VT'=>'VT'];
    return View::make("backoffice/print/session_presenter_workplace")->with('halls_lists',$halls_lists)->with('abs_types',$abs_types);
  }

  //getPrintPresenterWorkplace
   public function printSessionPresenterWorkplace()
  {
      $hall_id= Input::has('hall_id') ? Input::get('hall_id') : null ;
      $starts_by = Input::has("date") ? Input::get('date') : null ;
      $abs_type = Input::get("abs_type")? Input::get('abs_type') : null ;;

      $hall_id =  intval($hall_id) >0  ?$hall_id : null; 

      $selection_type_id = null;

      if($abs_type=="FP")
      {
       $abs_type ="FP" ;
       $selection_type_id ="2";
      }
      if($abs_type=="PP")
      {
       $abs_type ="FP" ;
       $selection_type_id ="4";
      }
      if($abs_type=="PPP")
      {
       $abs_type ="FP" ;
       $selection_type_id ="11";
      }
      if($abs_type=="HP")
      {
       $abs_type ="FP" ;
       $selection_type_id ="5,9";
      }
      if($abs_type=="VT")
      {
       $abs_type ="VT" ;
       $selection_type_id ="6";
      }

        $result = Abstracts::usp_get_abstracts_print(null,null,$abs_type,null,null,$selection_type_id,2,null,null,"order by date(starts_by),hall_id,time(starts_by),-sno DESC","order by role_order_no,role,name",null,null,$hall_id,$starts_by,null);
        // var_dump($result);
        // exit();

        $date_hall = [];
        foreach ($result["abstracts"] as $key => $value) 
        {
            $date_hall[]=date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name; 
          // or
           //array_push($date_hall,date('d/m/Y |',strtotime($value->starts_by)).$value->hall_name);
        }
        $date_hall=array_unique($date_hall);
        // var_dump($date_hall);
        // exit();


        $print_abstracts = [];
        foreach ($result["abstracts"] as $key => $value)
        {
          $print_abstracts[date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name][]= $value; 
        }

        $print_authors = [];
        foreach ($result["authors"] as $key => $value) 
        {
         $print_authors[$value->abs_id][$value->role.$value->name.$value->mobile] = $value;
         //or
         // $print_authors[$value->abs_id]["<b>".$value->role."</b>".":".$value->name.",".$value->mobile] = $value;
          
        }

        // $print_authors=array_unique($print_authors[$value->abs_id]);
        // var_dump($print_authors);
        //   exit();

        if(empty($result["abstracts"]))
        {
          return Redirect::to("/bo/print/createprintsessionpresenterworkplace")->with('msgError','NO RECORDS FOUND');
        }
        else
        {
          return View::make("backoffice/print/print_session_presenter_workplace")->with('result',$result)
                                                                ->with('print_authors',$print_authors)
                                                                ->with('date_hall',$date_hall)
                                                                ->with('print_abstracts',$print_abstracts);
        }

  }




  public function postPrintspeakerattendance()
  {
      $name= Input::get("hall_id");
      $starts_by = Input::get("date");

      $halls = new Halls;

    $halls->hall_id = $name;
    $halls->date = $starts_by;

    return Redirect::to('/bo/print/printspeakerattendance');

  }


  /* Audience print */
  public function getPrintaudienceattendance()
  {
      $hall_id= Input::has('hall_id') ? Input::get('hall_id') : null ;
      $starts_by = Input::get("date");

        $result = Abstracts::usp_get_abstracts_print(null,null,null,null,null,null,2,null,null,"order by date(starts_by),hall_id,time(starts_by)","order by role,name",null,null,$hall_id,$starts_by,null);
        // var_dump($result);
        // exit();

        $date_hall = [];
        foreach ($result["abstracts"] as $key => $value) 
        {
            $date_hall[]=date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name; 
          // or
           //array_push($date_hall,date('d/m/Y |',strtotime($value->starts_by)).$value->hall_name);
        }
        $date_hall=array_unique($date_hall);
        // var_dump($date_hall);
        // exit();


        $print_abstracts = [];
        foreach ($result["abstracts"] as $key => $value)
        {
          $print_abstracts[date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name][]= $value; 
        }


        if(empty($result["abstracts"]))
        {
          return Redirect::to("/bo/print/createprintaudienceattendance")->with('msgError','NO RECORDS FOUND');
        }
        else
        {
          return View::make("backoffice/print/print_audience_ps")->with('result',$result)
                                                                ->with('date_hall',$date_hall)
                                                                ->with('print_abstracts',$print_abstracts);
        }

  }

  public function createPrintaudienceattendance()
  {

    $halls_lists  = Halls::lists('name','hall_id');
    return View::make("backoffice/print/audience_attendance")->with('halls_lists',$halls_lists);
  }

  public function postPrintaudienceattendance()
  {
      $name= Input::get("hall_id");
      $starts_by = Input::get("date");

      $halls = new Halls;

    $halls->hall_id = $name;
    $halls->date = $starts_by;

    return Redirect::to('/bo/print/printaudienceattendance');

  }

  /* Audience print 1 */
  public function getPrintaudienceattendancetable()
  {
      $hall_id= Input::has('hall_id') ? Input::get('hall_id') : null ;
      $starts_by = Input::get("date");

        $result = Abstracts::usp_get_abstracts_print(null,null,null,null,null,null,2,null,null,"order by date(starts_by),hall_id,time(starts_by)","order by role,name",null,null,$hall_id,$starts_by,null);
        // var_dump($result);
        // exit();

        $date_hall = [];
        foreach ($result["abstracts"] as $key => $value) 
        {
            $date_hall[]=date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name; 
          // or
           //array_push($date_hall,date('d/m/Y |',strtotime($value->starts_by)).$value->hall_name);
        }
        $date_hall=array_unique($date_hall);
        // var_dump($date_hall);
        // exit();


        $print_abstracts = [];
        foreach ($result["abstracts"] as $key => $value)
        {
          $print_abstracts[date('d/m/Y | ',strtotime($value->starts_by)).$value->hall_name][]= $value; 
        }


        if(empty($result["abstracts"]))
        {
          return Redirect::to("/bo/print/createprintaudienceattendancetable")->with('msgError','NO RECORDS FOUND');
        }
        else
        {
          return View::make("backoffice/print/print_audience_pstable")->with('result',$result)
                                                                ->with('date_hall',$date_hall)
                                                                ->with('print_abstracts',$print_abstracts);
        }

  }

  public function createPrintaudienceattendancetable()
  {

    $halls_lists  = Halls::lists('name','hall_id');
    return View::make("backoffice/print/audience_attendancetable")->with('halls_lists',$halls_lists);
  }

  public function postPrintaudienceattendancetable()
  {
      $name= Input::get("hall_id");
      $starts_by = Input::get("date");

      $halls = new Halls;

    $halls->hall_id = $name;
    $halls->date = $starts_by;

    return Redirect::to('/bo/print/printaudienceattendancetable');

  }


}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists