Simple PHP Address Book for Scripting

Source: Internet
Author: User


The administrator can manually create a menu, select a list of individual departments from the LDAP server, select multiple recipients and replicas, and replicas, and send them using the preset mail client.
  
There are three archives:
  
Ldap.html is a pure framework file.
Ldap. php (as the mainstream development language) uses the menu, uses php (as the mainstream development language) to obtain the email address, and creates a javascript menu.
Select.html obtains the selected project from ldap. php (as the mainstream development language) and establishes a link for the mail client to use.
  
Clipboard. Because some program code comes from Squirrel Mail, this program is GPL. Poor skill. Please modify it. Icon_redface.gif
  
Ldap.html (no modification required)
  
Code:
  
<Html>
<Head> <title> Java Script LDAP Addressbook </title> <Frameset rows = "*, 130">
<Frame alt = "" http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> release/bOqs/W1Nq1xNb3wfe/qrei0 +/R1Ck8L2ZvbnQ + zajRtrK +" src = http://www.chinaitlab.com/www/news/ldap.php (as now mainstream development languages) name = "fr1">
<Frame alt = "scripting language new simple php (as the current mainstream development language) Address Book" src = http://www.chinaitlab.com/www/news/select.html name = "fr2">
</Frameset>
</Html>
Ldap. php (as the mainstream development language) (modify the ldap server link, department list, and Basic Search to meet your needs .)
  
※In particular, our company's search is based on lastname. It is not differentiated by departments. Modify the settings to meet your requirements.
  
Code:
  
<H3> free source code company address book query <Script language = "javascript">
  
Function to_addr ($ addr)
{
Var prefix = "";
Var pwintype = typeof parent.fr2.doc ument. selectaddr;
  
$ Addr = $ addr. replace (/{1,35} $ /,"");
  
If (pwintype! = "Undefined "){
If (parent.fr2.doc ument. selectaddr. toaddr. value ){
Prefix = ",";
Parent.fr2.doc ument. selectaddr. toaddr. value =
Parent.fr2.doc ument. selectaddr. toaddr. value + "," + $ addr;
} Else {
Parent.fr2.doc ument. selectaddr. toaddr. value = $ addr;
}
}
  
}
  
Function cc_addr ($ addr)
{
Var prefix = "";
Var pwintype = typeof parent.fr2.doc ument. selectaddr;
  
$ Addr = $ addr. replace (/{1,35} $ /,"");
  
If (pwintype! = "Undefined "){
If (parent.fr2.doc ument. selectaddr. ccaddr. value ){
Prefix = ",";
Parent.fr2.doc ument. selectaddr. ccaddr. value =
Parent.fr2.doc ument. selectaddr. ccaddr. value + "," + $ addr;
} Else {
Parent.fr2.doc ument. selectaddr. ccaddr. value = $ addr;
}
}
  
}
  
Function bcc_addr ($ addr)
{
Var prefix = "";
Var pwintype = typeof parent.fr2.doc ument. selectaddr;
  
$ Addr = $ addr. replace (/{1,35} $ /,"");
  
If (pwintype! = "Undefined "){
If (parent.fr2.doc ument. selectaddr. bccaddr. value ){
Prefix = ",";
Parent.fr2.doc ument. selectaddr. bccaddr. value =
Parent.fr2.doc ument. selectaddr. bccaddr. value + "," + $ addr;
} Else {
Parent.fr2.doc ument. selectaddr. bccaddr. value = $ addr;
}
}
  
}
</Script>
  
<Form method = "post" action = ldap. php (as the mainstream development language )? $ Query>
<Select name = "query" SIZE = "1" onChange = "submit ();">
  
<Option vlaue = "" SELECTED>
<Option value = 01 *> 01 R & D department
<Option value = 02 *> 02 Administration Department
<Option value = 03 *> 03 Quality Assurance Department
<Option value = *> list all
  
</SELECT>
</Form>
  
<? Php (as the mainstream development language)
// Basic sequence with LDAP is connect, bind, search, interpret search

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.