Advertisement
Guest User

laravel

a guest
Apr 14th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 32.27 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Console;
  4.  
  5. use Illuminate\Console\Scheduling\Schedule;
  6. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  7.  
  8. class Kernel extends ConsoleKernel
  9. {
  10.     /**
  11.      * The Artisan commands provided by your application.
  12.      *
  13.      * @var array
  14.      */
  15.     protected $commands = [
  16.         'App\Console\Commands\emailcron1'
  17.     ];
  18.  
  19.     /**
  20.      * Define the application's command schedule.
  21.      *
  22.      * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  23.      * @return void
  24.      */
  25.     protected function schedule(Schedule $schedule)
  26.     {
  27.         $schedule->command('emailcron2')
  28.                  ->everyMinute()
  29.                  ->sendOutputTo("/home/mainbiz/conapp/public/test.txt");
  30.                
  31.                
  32.     }
  33. }
  34.  
  35.  
  36. namespace App\Console\Commands;
  37.  
  38.  
  39. use Illuminate\Foundation\Bus\DispatchesJobs;
  40. use Illuminate\Routing\Controller as BaseController;
  41. use Illuminate\Foundation\Validation\ValidatesRequests;
  42. use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
  43.  
  44.  
  45.  
  46.  
  47. use Illuminate\Console\Command;
  48.  
  49. use DB;
  50. use Queue;
  51.  
  52. use App\Http\Controllers\Controller;
  53. use App\Fileentry;
  54. use Request;
  55. use Session;
  56. use Redirect;
  57. use Hash;
  58. use Mail;
  59. use App\Http\external\external_cron\MYPDF1;
  60. use Illuminate\Support\Facades\Storage;
  61. use Illuminate\Support\Facades\File;
  62. use Illuminate\Http\Response;
  63. use App\Company;
  64. use App\Data;
  65. use App\SuperAdmin;
  66. use App\Multiothernames;
  67. use App\Countries;
  68. use App\Cities;
  69. use App\Preview;
  70. use App\Publish;
  71. use App\PublishDate;
  72. use App\Pageno;
  73. use App\Emailcron;
  74. use App\Documentbank;
  75. use App\Spacelimit;
  76. use App\Demo;
  77. use View;
  78.  
  79. use App\Console\Commands\phpmailer\PHPMailer;
  80.  
  81.  
  82. use Illuminate\Pagination\Facades\LengthAwarePaginator;
  83.  
  84.  
  85.  
  86. class emailcron1 extends Command
  87. {
  88.     /**
  89.      * The name and signature of the console command.
  90.      *
  91.      * @var string
  92.      */
  93.     protected $signature = 'emailcron2';
  94.  
  95.     /**
  96.      * The console command description.
  97.      *
  98.      * @var string
  99.      */
  100.     protected $description = 'Send mails';
  101.  
  102.     /**
  103.      * Create a new command instance.
  104.      *
  105.      * @return void
  106.      */
  107.     public function __construct()
  108.     {
  109.         parent::__construct();
  110.        
  111.         //$this->loadAndAuthorizeResource(['class' => "App\\Console\\Commands\\emailcron1"]);
  112.     }
  113.  
  114.     /**
  115.      * Execute the console command.
  116.      *
  117.      * @return mixed
  118.      */
  119.    public function handle()
  120.     {
  121.        
  122.        
  123.     $s=""; 
  124.    
  125.     $d = new emailcron1();
  126.    
  127.     // $d->jb();
  128.    
  129.  Queue::push("emailcron1@jb",array('string' => 'Hello World '));
  130.  
  131.    
  132.    
  133.     }
  134.    
  135.    
  136.    
  137.     public function show($data,$data1,$news_id,$pub_date){
  138.     $r100="";$r110="";$r12="";$r13="";$r14="";$r15="";$r11="";
  139.    
  140.      $rt =  "&#10004;";
  141.    
  142.     $id=0;
  143.    
  144.    
  145.    
  146.  
  147.     $text1="";$j=0;$text2="";
  148.    // require_once('tc.php');
  149.    
  150.  
  151.    
  152.     if($news_id=="12"){
  153.  
  154.  
  155.  
  156.    
  157.    
  158.  
  159.    
  160.  
  161.   foreach($data1 as $da){
  162.      
  163.       $j++;
  164.      
  165.       if($da->id == $id){
  166.          
  167.          $rt =  "&#10004;";
  168.       }
  169.      
  170.       if($da->id !== $id){
  171.          
  172.          $rt =  "";
  173.       }
  174.      
  175.       if($j==1){
  176.          
  177.         if($da->service == "Change of name" && $da->category == "Single User"){
  178.              
  179.                $text1  ='<div style="background-color:black;color:white;width:100%; padding:0px;" align="center">'.$da->new_firstname.'</div>I formerly Known as '.'<strong>'.$da->frm_lastname.' '.$da->frm_middlename.' '.$da->frm_firstname.'</strong>'.'  henceforth wish to be addressed as '.'<strong>'.$da->new_lastname.' '.$da->new_middlename.' '.$da->new_firstname.'</strong>'.'. All former documents remain valid, general public take note '.$rt;
  180.              
  181.                
  182.              
  183.                
  184.                
  185.                
  186.            }
  187.            
  188.            if($da->service == "Confirmation of name" && $da->category == "Single User"){
  189.              
  190.                $text1  ="<strong>CONFIRMATION OF NAME :  </strong>"."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." is the same person as "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." All former documents remain valid, general public take note ".$rt;
  191.                
  192.              
  193.              
  194.                
  195.                
  196.                
  197.            }
  198.            
  199.             if($da->service == "Correction of name" && $da->category == "Single User"){
  200.                 $j++;
  201.                
  202.                 if($j%2 ==0 ){
  203.              
  204.                $text1  ="<strong>CORRECTION OF NAME :</strong> My name is " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." not <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong> ".". All former documents remain valid, general public take note".$rt;
  205.              
  206.                
  207.              
  208.                
  209.              
  210.                
  211.                 }
  212.                
  213.                 else if(($j)%2 ==0){
  214.                    
  215.                      $text1  ="<strong>CORRECTION OF NAME :</strong> My name was wrongly spelt as " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>" ." instead of <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname. "</strong>. All former documents remain valid, general public take note".$rt;
  216.              
  217.                
  218.                
  219.                
  220.               // $text4 = $da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname;
  221.                 }
  222.                
  223.                 else if(($j)%4 ==0){
  224.                    
  225.                     $text1  ="<strong>CORRECTION OF NAME :</strong> Formerly "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." now <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid, general public take note".$rt;
  226.              
  227.                
  228.              
  229.                
  230.                
  231.                    
  232.                 }
  233.                
  234.                 else{
  235.                    
  236.                     $text1  ="<strong>CORRECTION OF NAME : </strong>This is to inform that "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong> "."is the same person as <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid, general public take note".$rt;
  237.              
  238.                
  239.              
  240.                
  241.                
  242.                    
  243.                 }
  244.                
  245.            }
  246.            
  247.       }
  248.      
  249.       if($j==2){
  250.          
  251.         if($da->service == "Change of name" && $da->category == "Single User"){
  252.              
  253.                $text2  ='<div style="background-color:black;color:white;width:100%; padding:0px;" align="center">'.$da->new_firstname.'</div>I formerly Known as '.'<strong>'.$da->frm_lastname.' '.$da->frm_middlename.' '.$da->frm_firstname.'</strong>'.'  henceforth wish to be addressed as '.'<strong>'.$da->new_lastname.' '.$da->new_middlename.' '.$da->new_firstname.'</strong>'.'. All former documents remain valid, general public take note '.$rt;
  254.              
  255.                
  256.              
  257.                
  258.                
  259.                
  260.            }
  261.            
  262.            if($da->service == "Confirmation of name" && $da->category == "Single User"){
  263.              
  264.                $text2  ="<strong>CONFIRMATION OF NAME :  </strong>"."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." is the same person as "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." All former documents remain valid, general public take note ".$rt;
  265.                
  266.              
  267.              
  268.                
  269.                
  270.                
  271.            }
  272.            
  273.             if($da->service == "Correction of name" && $da->category == "Single User"){
  274.                 $j++;
  275.                
  276.                 if($j%2 ==0 ){
  277.              
  278.                $text2  ="<strong>CORRECTION OF NAME :</strong> My name is " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." not <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong> ".". All former documents remain valid, general public take note ".$rt;
  279.              
  280.                
  281.              
  282.                
  283.              
  284.                
  285.                 }
  286.                
  287.                 else if(($j)%2 ==0){
  288.                    
  289.                      $text2  ="<strong>CORRECTION OF NAME :</strong> My name was wrongly spelt as " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>" ." instead of <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname. "</strong>. All former documents remain valid, general public take note ".$rt;
  290.              
  291.                
  292.                
  293.                
  294.               // $text4 = $da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname;
  295.                 }
  296.                
  297.                 else if(($j)%4 ==0){
  298.                    
  299.                     $text2  ="<strong>CORRECTION OF NAME :</strong> Formerly "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." now <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid, general public take note ".$rt;
  300.              
  301.                
  302.              
  303.                
  304.                
  305.                    
  306.                 }
  307.                
  308.                 else{
  309.                    
  310.                     $text2  ="<strong>CORRECTION OF NAME : </strong>This is to inform that "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong> "."is the same person as <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid, general public take note ".$rt;
  311.              
  312.                
  313.              
  314.                
  315.                
  316.                    
  317.                 }
  318.                
  319.            }
  320.            
  321.       }
  322.      
  323.      
  324.   }
  325.  
  326.  
  327.    
  328.    
  329.    
  330.    
  331.    
  332.    
  333.    
  334.    
  335.    
  336.     $day  = date("l",strtotime($pub_date));
  337.    
  338.     $month  = date("F",strtotime($pub_date));
  339.    
  340.     $da1 =  date("d" ,strtotime($pub_date));
  341.    
  342.     $da2 =  date("Y" ,strtotime($pub_date));
  343.    
  344.    
  345.    
  346.    
  347.  
  348.   $tf1 = '<span style="font-size:7px;"><strong >DAILY TRUST,'.$day.','.$month.' '.$da1.', '.$da2.'</strong></span><h2 style="width:100%;border-top: 2px solid black;width:100%; font-size:16px; "><table><tr><td width="470">4</td><td><table><tr><td><span style="font-size:8px;"><strong>Like us on facebook.com/dailytrust</strong></span></td></tr><tr><td><span style="font-size:8px;"><strong>follow us on Twitter: @daily_trust</strong></span></td></tr></table></td></tr></table><hr><span style="font-size:0.5;color:white">nnn</span><hr><span style="font-size:11px;">&nbsp;&nbsp;&nbsp;Daily Trust</span><br><table cellspacing="10" cellpadding="1" width="100%" ><tr><td  width="350"><table>
  349.  <tr><td><span style="font-size:20px;">Classifieds made easy</span></td></tr><tr><td><br><div style="background-color:black;color:white;width:100px;position: absolute;bottom: 0;">CHANGE OF NAME</div></td></tr></table></td><td style="border: 2px solid black;text-align:justify;width:120px;font-size:6.5px; ">'.$text1.'</td> <td style="border: 2px solid black;text-align:justify;width:120px;font-size:6.5px; ">'.$text2.'</td></tr></table><table  style="table-layout:fixed;max-width:100%;font-size:7.2px;" cellspacing="10" cellpadding="1" >';
  350.  
  351.   $r10='';
  352.  
  353.   $re2="";
  354.  
  355.   $r1 =""; $r2 ="";$r3 =""; $r4 ="";$r5 =""; $r6 ="";$r7 =""; $r8 ="";$r9 ="";
  356.  
  357.   $rr1 =""; $rr2 ="";$rr3 =""; $rr4 ="";$rr5 =""; $rr6 ="";$rr7 =""; $rr8 ="";$rr9 ="";
  358.  
  359.   $k=0;
  360.  
  361.   $rr1="";
  362.  
  363.  
  364.   $text1="";
  365.  
  366.   $text2="";
  367.  
  368.   $text3 ="";
  369.  
  370.   $text4= "";
  371.  
  372.   $j=0;
  373.   $i=0;
  374.  
  375.   foreach($data as $da){
  376.       $k++;
  377.      
  378.       if($da->id== $id){
  379.          
  380.          $rt =  html_entity_decode("&#10004;", ENT_QUOTES | ENT_XML1, 'UTF-8') ;
  381.       }
  382.      
  383.       if($da->id !== $id){
  384.          
  385.          $rt =  "";
  386.       }
  387.      
  388.      
  389.         if($da->service == "Change of name" && $da->category == "Single User"){
  390.              
  391.                $text1  ='<div style="background-color:black;color:white;width:100%; padding:0px;" align="center">'.$da->new_firstname.'</div>I formerly Known as '.'<strong>'.$da->frm_lastname.' '.$da->frm_middlename.' '.$da->frm_firstname.'</strong>'.'  henceforth wish to be addressed as '.'<strong>'.$da->new_lastname.' '.$da->new_middlename.' '.$da->new_firstname.'</strong>'.'. All former documents remain valid, general public take note '.$rt;
  392.              
  393.                
  394.              
  395.                
  396.                
  397.                
  398.            }
  399.            
  400.            if($da->service == "Confirmation of name" && $da->category == "Single User"){
  401.              
  402.                $text1  ="<strong>CONFIRMATION OF NAME :  </strong>"."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." is the same person as "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." All former documents remain valid, general public take note ".$rt;
  403.                
  404.              
  405.              
  406.                
  407.                
  408.                
  409.            }
  410.            
  411.             if($da->service == "Correction of name" && $da->category == "Single User"){
  412.                 $j++;
  413.                
  414.                 if($j%2 ==0 ){
  415.              
  416.                $text1  ="<strong>CORRECTION OF NAME :</strong> My name is " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." not <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong> ".". All former documents remain valid, general public take note ".$rt;
  417.              
  418.                
  419.              
  420.                
  421.              
  422.                
  423.                 }
  424.                
  425.                 else if(($j)%2 ==0){
  426.                    
  427.                      $text1  ="<strong>CORRECTION OF NAME :</strong> My name was wrongly spelt as " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>" ." instead of <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname. "</strong>. All former documents remain valid, general public take note ".$rt;
  428.              
  429.                
  430.                
  431.                
  432.               // $text4 = $da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname;
  433.                 }
  434.                
  435.                 else if(($j)%4 ==0){
  436.                    
  437.                     $text1  ="<strong>CORRECTION OF NAME :</strong> Formerly "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." now <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid, general public take note " .$rt;
  438.              
  439.                
  440.              
  441.                
  442.                
  443.                    
  444.                 }
  445.                
  446.                 else{
  447.                    
  448.                     $text1  ="<strong>CORRECTION OF NAME : </strong>This is to inform that "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong> "."is the same person as <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid, general public take note " .$rt;
  449.              
  450.                
  451.              
  452.                
  453.                
  454.                    
  455.                 }
  456.                
  457.            }
  458.      
  459.      
  460.        if($k<7){
  461.            
  462.           $i++;
  463.            
  464.            
  465.          
  466.           // $re2 .="<td style='padding:10px;' ><div style='border-top: 2px solid black;'>".$text1."</div></td>";
  467.          
  468.           $re2 .='<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  469.          
  470.          
  471.       }
  472.      
  473.      
  474.      
  475.       if($k>=7 && $k<=12){
  476.          
  477.        
  478.          
  479.          
  480.           $rr1 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  481.          
  482.       }
  483.      
  484.        if($k>=13 && $k<=18){
  485.          
  486.          
  487.          
  488.         $rr2 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  489.          
  490.       }
  491.      
  492.        if($k>=19 && $k<=24){
  493.          
  494.          
  495.          
  496.           $rr3 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  497.          
  498.  
  499.       }
  500.      
  501.        if($k>=25 && $k<=30){
  502.          
  503.          
  504.          
  505.           $rr4 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  506.          
  507.       }
  508.      
  509.        if($k>=31 && $k<=36){
  510.          
  511.          
  512.          
  513.           $rr5 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  514.          
  515.       }
  516.      
  517.        if($k>=37 && $k<=42){
  518.          
  519.          
  520.          
  521.          $rr6 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  522.          
  523.  
  524.       }
  525.      
  526.       if($k>=43 && $k<=48){
  527.          
  528.          
  529.          
  530.           $rr7 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  531.          
  532.       }
  533.      
  534.       if($k>=49 && $k<=50){
  535.          
  536.          
  537.          
  538.           $rr8 .= '<td style="border: 2px solid black;text-align:justify; ">'.$text1.'</td>';
  539.          
  540.       }
  541.    
  542.    
  543.      
  544.   }
  545.  
  546.   if($re2!=""){
  547.   $r1 .= "<tr>".$re2."</tr>";
  548.   // $r1 .= "<div>".$re2."</div>";
  549.   }
  550.    if($rr1!=""){
  551.     $r2 .= "<tr>".$rr1."</tr>";
  552.    
  553.    }
  554.     if($rr2!=""){
  555.     $r3 .= "<tr>".$rr2."</tr>";
  556.     }
  557.    
  558.     if($rr3!=""){
  559.    
  560.      $r4 .= "<tr>".$rr3."</tr>";
  561.      
  562.     }
  563.     if($rr4!=""){
  564.     $r5 .= "<tr>".$rr4."</tr>";
  565.    
  566.     }
  567.    
  568.     if($rr5!=""){
  569.    
  570.     $r6 .= "<tr>".$rr5."</tr>";
  571.    
  572.     }
  573.    
  574.     if($rr6!=""){
  575.    
  576.     $r7 .= "<tr>".$rr6."</tr>";
  577.    
  578.     }
  579.     if($rr7!=""){
  580.    
  581.     $r8 .= "<tr>".$rr7."</tr>";
  582.    
  583.     }
  584.     if($rr8!=""){
  585.     $r9 .= "<tr>".$rr8."</tr>";
  586.    
  587.     }
  588.  
  589.   $r11="";
  590. $r11.= "</table></span></h2>";
  591. // Print a text
  592. $html = $tf1.$r10.$r1.$r2.$r3.$r4.$r5.$r6.$r7.$r8.$r9.$r11;
  593.  
  594.  
  595.  
  596.  
  597. return $html;
  598.    
  599.     }
  600.    
  601.     else if($news_id == "13"){
  602.        
  603.          
  604.  
  605.   $r10='<table style="table-layout:fixed;max-width:100%;font-size:6.7px;" cellspacing="3" cellpadding="1">';
  606.  
  607.   $re2="";
  608.  
  609.   $r1 =""; $r2 ="";$r3 =""; $r4 ="";$r5 =""; $r6 ="";$r7 =""; $r8 ="";$r9 ="";
  610.  
  611.   $rr1 =""; $rr2 ="";$rr3 =""; $rr4 ="";$rr5 =""; $rr6 ="";$rr7 =""; $rr8 ="";$rr9 ="";
  612.  
  613.   $rr10 =""; $rr11 ="";$rr12 =""; $rr13 ="";$rr14 =""; $rr15 ="";
  614.  
  615.   $k=0;
  616.  
  617.   $rr1="";
  618.  
  619.   $text1="";
  620.  
  621.   $text2="";
  622.  
  623.   $text3 ="";
  624.  
  625.   $text4= "";
  626.  
  627.   $j=0;
  628.   $id=0;
  629.   $i=0;
  630.   $rt ="&#10004;";
  631.   $id=0;
  632.    foreach($data as $da){
  633.       $k++;
  634.      
  635.       if($da->id == $id){
  636.          
  637.          $rt =  html_entity_decode("&#10004;", ENT_QUOTES | ENT_XML1, 'UTF-8') ;
  638.       }
  639.      
  640.       if($da->id !== $id){
  641.          
  642.          $rt =  "";
  643.       }
  644.      
  645.       $rt="";
  646.         if($da->service == "Change of name" && $da->category == "Single User"){
  647.            
  648.            
  649.              
  650.                $text1  ='<span style="text-transform: uppercase;"><strong>'.$da->new_firstname.'</strong></span>:'.' I formerly '.$da->frm_lastname.' '.$da->frm_middlename.' '.$da->frm_firstname.''.'  now '.$da->new_lastname.' '.$da->new_middlename.' '.$da->new_firstname.' . All former documents remain valid. General public take note <span style="font-size:12px;">'.$rt.'</span>';
  651.              
  652.                
  653.              
  654.                
  655.                
  656.                
  657.            }
  658.            
  659.            if($da->service == "Confirmation of name" && $da->category == "Single User"){
  660.              
  661.                $text1  ="<strong>CONFIRMATION OF NAME:</strong><strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." is the same person as "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." All former documents remain valid.General public take note ".$rt;
  662.                
  663.              
  664.              
  665.                
  666.                
  667.                
  668.            }
  669.            
  670.             if($da->service == "Correction of name" && $da->category == "Single User"){
  671.                 $j++;
  672.                
  673.                 if($j%2 ==0 ){
  674.              
  675.                $text1  ="<strong>CORRECTION OF NAME:</strong> My name is " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." not <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong> ".". All former documents remain valid. general public take note ".$rt;
  676.              
  677.                
  678.              
  679.                
  680.              
  681.                
  682.                 }
  683.                
  684.                 else if(($j)%2 ==0){
  685.                    
  686.                      $text1  ="<strong>CORRECTION OF NAME:</strong> My name was wrongly spelt as " ."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>" ." instead of <strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname. "</strong>. All former documents remain valid. General public take note ".$rt;
  687.              
  688.                
  689.                
  690.                
  691.               // $text4 = $da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname;
  692.                 }
  693.                
  694.                 else if(($j)%4 ==0){
  695.                    
  696.                     $text1  ="<strong>CORRECTION OF NAME:</strong> Formerly "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong>"." now <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid. General public take note " .$rt;
  697.              
  698.                
  699.              
  700.                
  701.                
  702.                    
  703.                 }
  704.                
  705.                 else{
  706.                    
  707.                     $text1  ="<strong>CORRECTION OF NAME:</strong> This is to inform that "."<strong>".$da->frm_lastname." ".$da->frm_middlename." ".$da->frm_firstname."</strong> "."is the same person as <strong>".$da->new_lastname." ".$da->new_middlename." ".$da->new_firstname."</strong>".". All former documents remain valid. General public take note " .$rt;
  708.              
  709.                
  710.              
  711.                
  712.                
  713.                    
  714.                 }
  715.                
  716.            }
  717.      
  718.      
  719.        if($k<7){
  720.            
  721.           $i++;
  722.          
  723.          
  724.            
  725.          
  726.           // $re2 .="<td style='padding:10px;' ><div style='border-top: 2px solid black;'>".$text1."</div></td>";
  727.          
  728.           $re2 .='<td style="text-align:justify; ">'.$text1.'</td>';
  729.          
  730.          
  731.       }
  732.      
  733.      
  734.      
  735.      else if($k>=7 && $k<=12){
  736.          
  737.        
  738.          
  739.          
  740.           $rr1 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  741.          
  742.       }
  743.      
  744.      else  if($k>=13 && $k<=18){
  745.          
  746.          
  747.          
  748.         $rr2 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  749.          
  750.       }
  751.      
  752.       else if($k>=19 && $k<=24){
  753.          
  754.          
  755.          
  756.           $rr3 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  757.          
  758.       }
  759.      
  760.       else if($k>=25 && $k<=30){
  761.          
  762.          
  763.          
  764.           $rr4 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  765.          
  766.       }
  767.      
  768.       else if($k>=31 && $k<=36){
  769.          
  770.          
  771.          
  772.           $rr5 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  773.          
  774.       }
  775.      
  776.       else if($k>=37 && $k<=42){
  777.          
  778.          
  779.          
  780.          $rr6 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  781.          
  782.  
  783.       }
  784.      
  785.      else if($k>=43 && $k<=48){
  786.          
  787.          
  788.          
  789.           $rr7 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  790.          
  791.       }
  792.      
  793.     else  if($k>=49 && $k<=54){
  794.          
  795.          
  796.          
  797.           $rr8 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  798.          
  799.       }
  800.      
  801.       else  if($k>=55 && $k<=60){
  802.          
  803.          
  804.          
  805.           $rr9 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  806.          
  807.       }
  808.      
  809.        else  if($k>=61 && $k<=66){
  810.          
  811.          
  812.          
  813.           $rr10 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  814.          
  815.       }
  816.    
  817.      else  if($k>=67 && $k<=72){
  818.          
  819.          
  820.          
  821.           $rr11 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  822.          
  823.       }
  824.      
  825.        else  if($k>=73 && $k<=78){
  826.          
  827.          
  828.          
  829.           $rr12 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  830.          
  831.       }
  832.      
  833.        else  if($k>=79 && $k<=84){
  834.          
  835.          
  836.          
  837.           $rr13 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  838.          
  839.       }
  840.      
  841.        else  if($k>=85 && $k<=90){
  842.          
  843.          
  844.          
  845.           $rr14 .= '<td style="text-align:justify; ">'.$text1.'</td>';
  846.          
  847.       }
  848.    
  849.      
  850.   }
  851.  
  852.   if($re2!=""){
  853.   $r1 .= "<tr>".$re2."</tr>";
  854.   // $r1 .= "<div>".$re2."</div>";
  855.   }
  856.    if($rr1!=""){
  857.     $r2 .= "<tr>".$rr1."</tr>";
  858.    
  859.    }
  860.     if($rr2!=""){
  861.     $r3 .= "<tr>".$rr2."</tr>";
  862.     }
  863.    
  864.     if($rr3!=""){
  865.    
  866.      $r4 .= "<tr>".$rr3."</tr>";
  867.      
  868.     }
  869.     if($rr4!=""){
  870.     $r5 .= "<tr>".$rr4."</tr>";
  871.    
  872.     }
  873.    
  874.     if($rr5!=""){
  875.    
  876.     $r6 .= "<tr>".$rr5."</tr>";
  877.    
  878.     }
  879.    
  880.     if($rr6!=""){
  881.    
  882.     $r7 .= "<tr>".$rr6."</tr>";
  883.    
  884.     }
  885.     if($rr7!=""){
  886.    
  887.     $r8 .= "<tr>".$rr7."</tr>";
  888.    
  889.     }
  890.     if($rr8!=""){
  891.     $r9 .= "<tr>".$rr8."</tr>";
  892.    
  893.     }
  894.    
  895.     if($rr9!=""){
  896.     $r100 = "<tr>".$rr9."</tr>";
  897.    
  898.     }
  899.    
  900.     if($rr10!=""){
  901.     $r110 = "<tr>".$rr10."</tr>";
  902.    
  903.     }
  904.    
  905.     if($rr11!=""){
  906.     $r12 = "<tr>".$rr11."</tr>";
  907.    
  908.     }
  909.    
  910.     if($rr12!=""){
  911.     $r13 = "<tr>".$rr12."</tr>";
  912.    
  913.     }
  914.    
  915.     if($rr13!=""){
  916.     $r14 = "<tr>".$rr13."</tr>";
  917.    
  918.     }
  919.     if($rr14!=""){
  920.     $r15 = "<tr>".$rr14."</tr>";
  921.    
  922.     }
  923.  
  924.  
  925.   $r11="";
  926. $r11.= "</table>";
  927.  
  928.  
  929.    
  930. $page1="";
  931. $day  = date("l",strtotime($pub_date));
  932.    
  933.     $month  = date("F",strtotime($pub_date));
  934.    
  935.     $da1 = date("d",strtotime($pub_date));
  936.    
  937.     $da2 = date("Y",strtotime($pub_date));
  938.    
  939.     //$page = Pageno::whereRaw("newspaper_id='".$idj."'")->get();
  940.    
  941.    
  942. $tfr = '<div style="font-size:7px">11 &nbsp;|&nbsp;'.$day.','.$month.','.$da1.','.$da2.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;    THE GUARDIAN www.ngrguardiannews.com<hr></div><div style="border:0.5px solid black;"><div style="font-size:18px; background-color:black;color:white">Change of Name</div>';
  943. // Print a text
  944. $html = $tfr.$r10.$r1.$r2.$r3.$r4.$r5.$r6.$r7.$r8.$r9.$r100.$r110.$r12.$r13.$r14.$r15.$r11."</div>";
  945.  
  946.  
  947.    
  948. //$pdf->writeHTML($html, true, false, true, false, '');
  949.  
  950. return $html;
  951.       //$i++;
  952.            
  953.          
  954.           // $re2 .="<td style='padding:10px;' ><div style='border-top: 2px solid black;'>".$text1."</div></td>";
  955.          
  956.         //$r2= slot2($a->id,$data);
  957.        
  958.        
  959.    
  960.  
  961.  
  962. // add a page
  963.  
  964.  
  965. // Print a text
  966.  
  967.  
  968.  
  969.  
  970.  
  971. // ---------------------------------------------------------
  972.  
  973. //Close and output PDF document
  974. //$pdf->Output('Template1.pdf', 'I');
  975.  
  976. //============================================================+
  977. // END OF FILE
  978. //============================================================+
  979.    
  980.     //return view('preview_temp');
  981.        
  982.     }
  983.    
  984.    
  985.    
  986.    
  987.     //$filename =$dd.".pdf";
  988.    
  989.  
  990.  
  991.    
  992.     }
  993.    
  994.     public function jb(){
  995.        
  996.         echo 3;
  997.  
  998.         $email_cron = DB::table('email_cron')
  999.                 ->orderBy('id', 'asc')->take(1)
  1000.                 ->get();
  1001.  
  1002.  
  1003.  
  1004.  
  1005.    
  1006.    
  1007.    foreach($email_cron as $er){
  1008.        $idfs = $er->id;
  1009.        $news_id = $er->newspaper_id;
  1010.         $pub_date = $er->date;
  1011.        
  1012.         $pageno = $er->pageno;
  1013.        
  1014.    }
  1015.    
  1016.     $spacelimit = Spacelimit::whereRaw("status='enabled' and newspaper_id='".$news_id."'")->get();
  1017.    
  1018.     foreach($spacelimit as $sp){
  1019.        
  1020.        
  1021.         $space_limit1 = $sp->newspaper_id;
  1022.        
  1023.        
  1024.     }
  1025.     $data1="";
  1026.     if($space_limit1==50){
  1027.         $data = Data::whereRaw("status='enabled' and status_main='onQueue' newspaper='".$news_id."' order by id desc limit 48 ")->get();
  1028.         $data3 = Data::whereRaw("status='enabled' and status_main='onQueue' newspaper='".$news_id."' order by id desc limit 48 ")->get();
  1029.    
  1030.     $data1 = Data::whereRaw("status='enabled' and status_main='onQueue' newspaper='".$news_id."' order by id desc limit 2 ")->get();
  1031.    
  1032.     }
  1033.    
  1034.     else{
  1035.        
  1036.         $data3 = Data::whereRaw("status='enabled' and status_main='onQueue' and newspaper='".$news_id."' order by id desc limit 90 ")->get();
  1037.    $data = Data::whereRaw("status='enabled' and status_main='onQueue' and newspaper='".$news_id."' order by id desc limit 90 ")->get();
  1038.    // $data1 = Data::whereRaw("status='enabled' and status_main='onQueue' newspaper='".$news_id."' order by id desc limit 2 ")->get();
  1039.        
  1040.     }
  1041.    
  1042.    
  1043.     $k=0;
  1044.     $d = new emailcron1();
  1045.    
  1046.    
  1047.        
  1048.         foreach($data as $ae){
  1049.     $k++;
  1050.     $pdf = new MYPDF1(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
  1051.  
  1052. $pdf->SetCreator(PDF_CREATOR);
  1053. $pdf->SetAuthor('Nicola Asuni');
  1054. $pdf->SetTitle('TCPDF Example 051');
  1055. $pdf->SetSubject('TCPDF Tutorial');
  1056. $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
  1057.  
  1058. // set header and footer fonts
  1059. $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
  1060.  
  1061. // set default monospaced font
  1062. $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
  1063.  
  1064. // set margins
  1065. $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
  1066. $pdf->SetHeaderMargin(0);
  1067. $pdf->SetFooterMargin(0);
  1068.  
  1069. // remove default footer
  1070. $pdf->setPrintFooter(false);
  1071.  
  1072. // set auto page breaks
  1073. //$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
  1074.  
  1075. // set image scale factor
  1076. $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
  1077.  
  1078. // set some language-dependent strings (optional)
  1079.  
  1080.  
  1081. if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
  1082.     require_once(dirname(__FILE__).'/lang/eng.php');
  1083.     $pdf->setLanguageArray($l);
  1084. }
  1085.     //$pdf->setFontSubsetting(false) ;
  1086.    
  1087.     //$pdf->pdfa_mode(false);  
  1088.     $pdf->SetFont('dejavusans', '', 1);  
  1089.      
  1090.  
  1091. // add a page
  1092. $pdf->AddPage();
  1093.     //echo $i;
  1094.     //$compressed = gzcompress(, 9);
  1095.    
  1096.  
  1097.    
  1098.     //break;
  1099.    
  1100. $pdf->writeHTML($d->show($data3,$data1,$news_id,$pub_date), true, false, true, false, '');
  1101.  
  1102. $pdf->output("/home/mainbiz/public_html/conapp_update/t1/".$k.".pdf","F"); 
  1103.  
  1104. $file = "/home/mainbiz/public_html/conapp_update/t1/".$k.".pdf";
  1105.  
  1106. $first_name = $ae->new_firstname;
  1107.  
  1108. if($ae->service=="Confirmation of name"){
  1109.    
  1110.     $first_name = $ae->frm_firstname;
  1111.    
  1112.    
  1113. }
  1114.  
  1115. $datart = array("hi",$file,$ae->email,$first_name,$ae->service);
  1116.  
  1117.  
  1118.  
  1119.  
  1120. if($k<=6){
  1121.    
  1122.     $row = 1;
  1123.     $column = $k;
  1124. }
  1125. else if($k>=7 && $k<=12 ){
  1126.    
  1127.     $row = 2;
  1128.     $column = $k-6;
  1129.    
  1130. }
  1131.  
  1132. else if($k>=13 && $k<=18 ){
  1133.    
  1134.     $row = 3;
  1135.     $column = $k-12;
  1136.    
  1137. }
  1138.  
  1139. else if($k>=19 && $k<=24 ){
  1140.    
  1141.     $row = 4;
  1142.     $column = $k-18;
  1143.    
  1144. }
  1145.  
  1146. else if($k>=25 && $k<=30 ){
  1147.    
  1148.     $row = 5;
  1149.     $column = $k-24;
  1150.    
  1151. }
  1152.  
  1153. else if($k>=31 && $k<=36 ){
  1154.    
  1155.     $row = 6;
  1156.     $column = $k-30;
  1157.    
  1158. }
  1159.  
  1160. else if($k>=37 && $k<=42 ){
  1161.    
  1162.     $row = 7;
  1163.     $column = $k-36;
  1164.    
  1165. }
  1166.  
  1167. else if($k>=43 && $k<=48 ){
  1168.    
  1169.     $row = 8;
  1170.     $column = $k-42;
  1171.    
  1172. }
  1173.  
  1174. else if($k>=49 && $k<=54 ){
  1175.    
  1176.     $row = 9;
  1177.     $column = $k-48;
  1178.    
  1179. }
  1180.  
  1181. else if($k>=55 && $k<=60 ){
  1182.    
  1183.     $row = 10;
  1184.     $column = $k-54;
  1185.    
  1186. }
  1187.  
  1188. else if($k>=61 && $k<=66 ){
  1189.    
  1190.     $row = 11;
  1191.     $column = $k-60;
  1192.    
  1193. }
  1194.  
  1195. else if($k>=67 && $k<=72 ){
  1196.    
  1197.     $row = 12;
  1198.     $column = $k-66;
  1199.    
  1200. }
  1201.  
  1202. else if($k>=73 && $k<=78 ){
  1203.    
  1204.     $row = 13;
  1205.     $column = $k-72;
  1206.    
  1207. }
  1208.  
  1209. else if($k>=79 && $k<=84 ){
  1210.    
  1211.     $row = 14;
  1212.     $column = $k-78;
  1213.    
  1214. }
  1215.  
  1216. else if($k>=85 && $k<=90 ){
  1217.    
  1218.     $row = 15;
  1219.     $column = $k-84;
  1220.    
  1221. }
  1222.  
  1223.  
  1224. $_SESSION['firstname_em2'] = $first_name ;
  1225.  
  1226. $_SESSION['pub_date_em2'] = date("jS F Y",strtotime($pub_date)) ;
  1227.  
  1228. $_SESSION['row_em2'] = $row ;
  1229.  
  1230. $_SESSION['column_em2'] = $column;
  1231.  
  1232. $_SESSION['pageno_em2'] = $pageno;
  1233.  
  1234. $_SESSION['service_em2'] = $ae->service;
  1235.  
  1236. //return $ae->service;
  1237.  
  1238. $d = Data::find($ae->id);
  1239.  
  1240. $d->status_main= "Processed";
  1241.  
  1242. $d->save();
  1243.  
  1244.    
  1245.     /* Mail::send('email2', $datart, function($message) use ($datart)
  1246. {
  1247.    
  1248.      $message->from('noreply@conapp.com', 'CONAPP');
  1249.     $message->to($datart[2])->subject($datart[4]." For ".$datart[3]);
  1250.     $message->attach($datart[1]);
  1251. });
  1252.  
  1253.     } */
  1254.  
  1255.  
  1256.    
  1257.     $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  1258. <html xmlns="http://www.w3.org/1999/xhtml">
  1259. <head>
  1260. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  1261. <title>Conapp</title>
  1262. </head>
  1263.  
  1264. <body>
  1265.  
  1266.  
  1267. Dear '.$_SESSION['firstname_em2'].',
  1268. <br /><br />
  1269. Your <b>advert request</b> for <b>'.$_SESSION['service_em2'].' </b> has been successfully processed and the <b>digital version</b> of your <b>advert publication</b> is attached herewith. Spot your <b>advert</b> in the slot/space marked with this tick <span style="font-size:18px;"> &#10004;</span> icon.
  1270. <br /><br />
  1271. Other advert publication details are as follows;
  1272. <br /><br />
  1273. <b>Your Newspaper Advert:</b>
  1274. <br /><br />
  1275.     &#10004; &nbsp;Publication Date – '.$_SESSION['pub_date_em2'].'.<br />
  1276.     &#10004; &nbsp;Advert Space statistics – Row '.$_SESSION['row_em2'].'  Column '.$_SESSION['column_em2'].' on page '.$_SESSION['pageno_em2'].' .<br />
  1277. &#10004; &nbsp;Newspaper copy – 1 free copy.<br />
  1278.     &#10004; &nbsp;Newspaper dispatch – free delivery 7 days from now.<br /><br />
  1279. <b>Your Digital Advert:</b><br /><br />
  1280.     &#10004;&nbsp;Publication Date – Today.<br />
  1281.     &#10004;&nbsp;Advert Space Statistics – ;Advert Space statistics – Row '.$_SESSION['row_em2'].'  Column '.$_SESSION['column_em2'].' on page '.$_SESSION['pageno_em2'].'. <br />
  1282.     &#10004;&nbsp;Digital copy – <span style="color:#0F9;">Download from attachment, share or print</span>.<br /><br />
  1283. We value your patronage, please spare three (3) minutes of your time, click on the link below to rate our App vis-à-vis your user experience.
  1284. <br /> <br />
  1285. Thank you.
  1286. <br /><br />
  1287. Conapp Project Team<br />
  1288. <b>Mainstream System Solutions </b>
  1289. <br /><br />
  1290.     <img src="http://www.mainstreamss.biz/conapp_update/images/inq.png"/>
  1291. <img src="http://www.mainstreamss.biz/conapp_update/t1/1.pdf"/>
  1292.  
  1293. </body>
  1294. </html>';
  1295.  
  1296.  
  1297.    
  1298.     //$file = "/home/mainbiz/public_html/conapp_update/t1/1.pdf";
  1299.    
  1300. $datart = array("hi",$file,$ae->email,$first_name,$ae->service);
  1301.  
  1302. $email = new PHPMailer();
  1303. $email->IsSMTP(); // enable SMTP
  1304. $email->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
  1305. $email->SMTPAuth = true; // authentication enabled
  1306. $email->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
  1307. $email->Host = "gator3099.hostgator.com";
  1308. $email->Port = 465; // or 587
  1309. $email->IsHTML(true);
  1310. $email->Username = "shola@mainstreamss.biz";
  1311. $email->Password = "shola.2015";
  1312. $email->From      = 'shola@mainstreamss.biz';
  1313. $email->FromName  = 'CONAPP';
  1314. $email->Subject   = $datart[4]." For ".$datart[3];
  1315. $email->Body      = $message;
  1316. $email->AddAddress( $ae->email );
  1317.  
  1318. $file_to_attach = 'PATH_OF_YOUR_FILE_HERE';
  1319.  
  1320. $email->AddAttachment( $file , 'L2.pdf' );
  1321.  
  1322. return $email->Send(); 
  1323.    
  1324.     $cp = Emailcron::find($idfs);
  1325.    
  1326.     //$cp->delete();
  1327.    
  1328.  
  1329.  
  1330.  
  1331.    
  1332.          
  1333.     }
  1334.    
  1335.    
  1336.        
  1337. }
  1338. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement