[wpkg_web] / error_report.php Repository:
ViewVC logotype

View of /error_report.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23 - (download) (annotate)
Mon Jan 8 19:39:22 2007 UTC (11 years, 6 months ago) by linuxkidd
File size: 733 byte(s)
Modifying to use external language packs

<?php
function error_report ($e_sql,$error_message) {
  
$on_screen=1;

  if(
$on_screen) {
    die(
$vocab['errmsg-cannot'] . ": " $e_sql " --- " $error_message);
  } else {
    
$to_email="myemail@mydomain.com";
    
$to="To: " $to_email;
    
$from="From: \"WPKG Web\" <myemail@mydomain.com>";
    
$subject="Subject: WPKG Web SQL error";

    
$message=$vocab['errmsg-report'] . "\n\n" $vocab['errmsg-cannot'] . ": " $e_sql " --- " $error_message "\n\n";

     
$fd=popen("/usr/sbin/sendmail -t -i"'w');
     
fputs($fd$to "\n");
     
fputs($fd$from "\n");
     
fputs($fd$subject "\n");
     
fputs($fd"X-Mailer: PHP/" phpversion() . "\n\n");
     
fputs($fd$message "\n");
     
pclose($fd);
  }
}
?>

ViewVC Help
Powered by ViewVC 1.0.3