| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> perl >> web jie mian tian jia email de Perl cheng xu bu wan zheng ban

web jie mian tian jia email de Perl cheng xu bu wan zheng ban

2008-05-31 00:04:58 编辑來源:互联网 评论
 
 
 
本文为【web界面添加email的Perl程序不完整版】的拼音翻译版
  ############################
  # shuo ming :web jie mian tian jia email de Perl cheng xu bu wan zheng ban
  # ming cheng :webadmin.cgi
  # xi tong huan jing :Freebsd、Mod_Perl、MySQL、Apache、Apache::DBI、PostFix 2.x、igenus for postfix 1.0
  # zuo zhe : qiu xiong sheng
  #QQ:2263537
  #MSN:sunboydavid#hotmail.com
  #SkyPe:haoqiu
  # shi jian :2005 nian 5 yue 26 ri
  ############################
  #!/usr/bin/perl
  use lib 'libs/';
  use strict;
  use CGI::Carp qw(fatalsToBrowser);
  use CGI;
  use Apache::DBI;
  use IMail;
  # Get CGI parameters
  my $cgi = new CGI;
  my $mail = $cgi-param('mail');
  my $password = $cgi-param('password');
  my $realname = $cgi-param('realname');
  my ($username,$domain)=split(/\@/,$mail);
  unless($domain){
   print "Content-Type: text/html\n\n";
   print qq~
  you jian xi tong guan li
  tian jia you jian yong hu
  Email di zhi :
  mi ma :
  zhen shi xing ming :
   ~;
   exit;
  }
  # shu ju fen xi
  $mail or die " you xiang mei tian o .\n\n";
  $password or die " mi ma mei tian o .\n\n";
  $realname or die " zhen shi xing ming mei tian o .\n\n";
  # lian jie shu ju ku
  my $dbh = connectDb();
  # tian jia yong hu
  my $uid=125;
  my $gid=125;
  my $home="/var/mail";
  my $size=10240000;
  # cha xun yi you yu
  my $query = "SELECT COUNT(*) FROM transport WHERE domain = ?";
  my $sth = $dbh-prepare_cached($query);
  $sth-execute($domain) or dbError();
  my $count=$sth-fetchrow_arrayref-[0];
  $sth-finish;
  unless ($count){
   # tian jia yu
   my $query = "INSERT INTO transport SET domain=?,transport=?";
   my $sth = $dbh-prepare_cached($query);
   $sth-execute($domain,'virtual:') or die"' shu ju ku cao zuo cuo wu , yu wei tian jia cheng gong .\n\n";
   $sth-finish;
  }
  my $query = "INSERT INTO virtual_users SET email=?,password=?,uid=?,gid=?,home=?,maildir=?,regtime=NOW(),domain=?,username=?,quota=?";
  my $sth = $dbh-prepare_cached($query);
  $sth-execute($mail,$password,$uid,$gid,"$home/","$domain/$username/Maildir/",$domain,$realname,$size) or die"' shu ju ku cao zuo cuo wu , yong hu wei tian jia cheng gong .\n\n";
  $sth-finish;
  # yu
  if (! -e "$home/$domain") {
   mkdir("$home/$domain", "0700");
   `chmod 700 $home/$domain`;
  }
  # yong hu
  if (! -e "$home/$domain/$username") {
   mkdir("$home/$domain/$username", "0700");
   `chmod 700 $home/$domain/$username`;
  }
  # Maildir
  if (! -e "$home/$domain/$username/Maildir") {
   mkdir("$home/$domain/$username/Maildir", "0700");
   `chmod 700 $home/$domain/$username/Maildir`;
  }
  # cur
  if (! -e "$home/$domain/$username/Maildir/cur") {
   mkdir("$home/$domain/$username/Maildir/cur", "0700");
   `chmod 700 $home/$domain/$username/Maildir/cur`;
  }
  # tmp
  if (! -e "$home/$domain/$username/Maildir/tmp") {
   mkdir("$home/$domain/$username/Maildir/tmp", "0700");
   `chmod 700 $home/$domain/$username/Maildir/tmp`;
  }
  # new
  if (! -e "$home/$domain/$username/Maildir/new") {
   mkdir("$home/$domain/$username/Maildir/new", "0700");
   `chmod 700 $home/$domain/$username/Maildir/new`;
  }
  chown ($uid, $gid, "$home/$domain") or warn "couldn't chown $home/$domain";
  # ye mian tiao zhuan
  print $cgi-header(-location="mail_admin.cgi");
  #End【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
############################ # shuo ming :web jie mian tian jia email de Perl cheng xu bu wan zheng ban # ming cheng :webadmin.cgi # xi tong huan jing :Freebsd、Mod_Perl、MySQL、Apache、Apache::DBI、PostFix 2.x、igenus for postfix 1.0 # zuo zhe : qiu xiong sheng #QQ:2263537 #MSN:sunboydavid#hotmail.com #SkyPe:haoqiu # shi jian :2005 nian 5 yue 26 ri ############################ #!/usr/bin/perl use lib 'libs/'; use strict; use CGI::Carp qw(fatalsToBrowser); use CGI; use Apache::DBI; use IMail; # Get CGI parameters my $cgi = new CGI; my $mail = $cgi-param('mail'); my $password = $cgi-param('password'); my $realname = $cgi-param('realname'); my ($username,$domain)=split(/\@/,$mail); unless($domain){ print "Content-Type: text/html\n\n"; print qq~ you jian xi tong guan li tian jia you jian yong hu Email di zhi : mi ma : zhen shi xing ming : ~; exit; } # shu ju fen xi $mail or die " you xiang mei tian o .\n\n"; $password or die " mi ma mei tian o .\n\n"; $realname or die " zhen shi xing ming mei tian o .\n\n"; # lian jie shu ju ku my $dbh = connectDb(); # tian jia yong hu my $uid=125; my $gid=125; my $home="/var/mail"; my $size=10240000; # cha xun yi you yu my $query = "SELECT COUNT(*) FROM transport WHERE domain = ?"; my $sth = $dbh-prepare_cached($query); $sth-execute($domain) or dbError(); my $count=$sth-fetchrow_arrayref-[0]; $sth-finish; unless ($count){ # tian jia yu my $query = "INSERT INTO transport SET domain=?,transport=?"; my $sth = $dbh-prepare_cached($query); $sth-execute($domain,'virtual:') or die"' shu ju ku cao zuo cuo wu , yu wei tian jia cheng gong .\n\n"; $sth-finish; } my $query = "INSERT INTO virtual_users SET email=?,password=?,uid=?,gid=?,home=?,maildir=?,regtime=NOW(),domain=?,username=?,quota=?"; my $sth = $dbh-prepare_cached($query); $sth-execute($mail,$password,$uid,$gid,"$home/","$domain/$username/Maildir/",$domain,$realname,$size) or die"' shu ju ku cao zuo cuo wu , yong hu wei tian jia cheng gong .\n\n"; $sth-finish; # yu if (! -e "$home/$domain") { mkdir("$home/$domain", "0700"); `chmod 700 $home/$domain`; } # yong hu if (! -e "$home/$domain/$username") { mkdir("$home/$domain/$username", "0700"); `chmod 700 $home/$domain/$username`; } # Maildir if (! -e "$home/$domain/$username/Maildir") { mkdir("$home/$domain/$username/Maildir", "0700"); `chmod 700 $home/$domain/$username/Maildir`; } # cur if (! -e "$home/$domain/$username/Maildir/cur") { mkdir("$home/$domain/$username/Maildir/cur", "0700"); `chmod 700 $home/$domain/$username/Maildir/cur`; } # tmp if (! -e "$home/$domain/$username/Maildir/tmp") { mkdir("$home/$domain/$username/Maildir/tmp", "0700"); `chmod 700 $home/$domain/$username/Maildir/tmp`; } # new if (! -e "$home/$domain/$username/Maildir/new") { mkdir("$home/$domain/$username/Maildir/new", "0700"); `chmod 700 $home/$domain/$username/Maildir/new`; } chown ($uid, $gid, "$home/$domain") or warn "couldn't chown $home/$domain"; # ye mian tiao zhuan print $cgi-header(-location="mail_admin.cgi"); #End
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
赏心悦目的模特儿(9)
赏心悦目的模特儿(8)
赏心悦目的模特儿(7)
赏心悦目的模特儿(6)
周六一日游--绿野翠蜂场(一)
骆驼峰
下一站上环
杂乱的几张Danang
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有