Permalink
Browse files

adding version 1.0 from http://svn.wp-plugins.org/sh-email-alert/tags…

  • Loading branch information...
0 parents commit c8d3e5ba8285dbf99bf6b98447ed0f25cf71a0d0 Sean Klein committed Feb 3, 2012
Showing with 1,820 additions and 0 deletions.
  1. BIN donate_btn.gif
  2. +32 −0 excel.php
  3. +50 −0 functions.php
  4. +804 −0 jquery.form.js
  5. +339 −0 license.txt
  6. +201 −0 manage.php
  7. +49 −0 options.php
  8. +75 −0 pager.php
  9. +45 −0 readme.txt
  10. +30 −0 sh-email-alert.css
  11. +172 −0 sh-email-alert.php
  12. +23 −0 subscribe.php
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,32 @@
+<?php
+include_once('../../../wp-config.php');
+include_once('../../../wp-load.php');
+include_once('../../../wp-includes/wp-db.php');
+global $wpdb;
+$filename="sh_mailing_lists.xls";
+header("Content-Type: application/vnd.ms-excel; charset=utf-8");
+header("Content-Disposition: attachment; filename=$filename");
+header("Pragma: no-cache");
+header("Expires: 0");
+
+echo iconv("utf-8", "utf-8", "ID")."\t";
+echo iconv("utf-8", "utf-8", "Name")."\t";
+echo iconv("utf-8", "utf-8", "Job Title")."\t";
+echo iconv("utf-8", "utf-8", "Company")."\t";
+echo iconv("utf-8", "utf-8", "Country")."\t";
+echo iconv("utf-8", "utf-8", "Email")."\t";
+echo iconv("utf-8", "utf-8", "Mobile")."\t";
+echo iconv("utf-8", "utf-8", "Subscribe Date")."\n";
+
+$mails = $wpdb->get_results('select * from sh_email_alert');
+foreach($mails as $mail):
+ echo iconv("utf-8", "utf-8", $mail->id)."\t";
+ echo iconv("utf-8", "utf-8", $mail->name)."\t";
+ echo iconv("utf-8", "utf-8", $mail->job_title)."\t";
+ echo iconv("utf-8", "utf-8", $mail->company)."\t";
+ echo iconv("utf-8", "utf-8", $mail->country)."\t";
+ echo iconv("utf-8", "utf-8", $mail->email)."\t";
+ echo iconv("utf-8", "utf-8", $mail->mobile)."\t";
+ echo iconv("utf-8", "utf-8", $mail->pubtime)."\n";
+endforeach;
+?>
@@ -0,0 +1,50 @@
+<?php
+// Get Country lists
+function get_countries(){
+ $countries_name = "Afghanistan,Albania,Algeria,American Samoa,Andorra,Angola,Anguilla,Antarctica,Antarctica French Southern territories,Antigua and Barbuda,Argentina,Armenia,Aruba,Australia,Austria,Azerbaijan,Bahamas,Bahrain,Bangladesh,Barbados,Belarus,Belgium,Belize,Benin,Bermuda,Bhutan,Bolivia,Bosnia and Herzegovina,Botswana,Bouvet Island,Brazil,British Indian Ocean Territory,Bulgaria,Burkina Faso,Burundi,Brunei,Cambodia,Cameroon,Canada,Cape Verde,Cayman Islands,Central African Republic,Chad,Cocos (Keeling) Islands,Chile,China,Christmas Island,Colombia,Comoros,Congo Democratic Republic,Congo,Cook Islands,Costa Rica,Cote d'Ivoire,Croatia,Cuba,Cyprus,Czech Republic,Denmark,Djibouti,Dominica,Dominican Republic,East Timor,Ecuador,Egypt,El Salvador,Eritrea,Equatorial Guinea,Estonia,Ethiopia,Falkland Islands,Faroe Islands,Fiji,Fiji Islands,Finland,France,French Guiana,French Polynesia,Gabon,Gambia,Germany,Georgia,Ghana,Gibraltar,Greece,Greenland,Grenada,Guadeloupe,Guam,Guatemala,Guinea,Guinea-Bissau,Guyana,Haiti,Heard Island and McDonald Islands,Honduras,Hong Kong,Hungary,Iceland,India,Indonesia,Iran,Iraq,Ireland,Israel,Italy,Jamaica,Japan,Jordan,Kazakstan,Kenya,Kiribati,Kuwait,Kyrgyzstan,Laos,Latvia,Lebanon,Lesotho,Liechtenstein,Liberia,Libyan Arab Jamahiriya,Lithuania,Luxembourg,Macao,Macedonia,Madagascar,Malawi,Malaysia,Maldives,Mali,Malta,Marshall Islands,Mauritania,Mauritius,Martinique,Mayotte,Mexico,Micronesia Federated States of,Moldova,Monaco,Mongolia,Montserrat,Morocco,Mozambique,Myanmar,Namibia,Nauru,Nepal,Netherlands,Netherlands Antilles,New Caledonia,New Zealand,Nicaragua,Niger,Nigeria,Niue,Norfolk Island,Northern Mariana Islands,North Korea,Norway,Oman,Pakistan,Palestine,Palau,Panama,Papua New Guinea,Paraguay,Peru,Philippines,Pitcairn,Poland,Portugal,Puerto Rico,Qatar,Reunion,Romania,Russian Federation,Rwanda,Saint Helena,Saint Kitts and Nevis,Saint Pierre and Miquelon,Saint Lucia,Saint Vincent and the Grenadines,Sao Tome and Principe,Samoa,San Marino,Saudi Arabia,Senegal,Seychelles,Sierra Leone,Singapore,Slovakia,Slovenia,Solomon Islands,South Africa,South Georgia and the South Sandwich Islands,South Korea,Somalia,Spain,Sri Lanka,Sudan,Suriname,Svalbard and Jan Mayen,Swaziland,Sweden,Switzerland,Syria,Taiwan,Tanzania,Tajikistan,Thailand,Tokelau,Togo,Tonga,Trinidad and Tobago,Tunisia,Turkey,Turkmenistan,Turks and Caicos Islands,Tuvalu,Uganda,United Arab Emirates,United Kingdom,United States Minor Outlying Islands,United States,Ukraine,Uruguay,Uzbekistan,Vanuatu,Vatican Holy See (Vatican City State),Venezuela,Vietnam,Virgin Islands GB,Virgin Islands U.S.,Wallis and Futuna,Western Sahara,Yemen,Yugoslavia,Zambia,Zimbabwe";
+ $countries = split(',',$countries_name);
+ return $countries;
+}
+// Add to mailing list
+function sh_email_alert_add(){
+ global $wpdb;
+ $uname = $_POST['uname'];
+ $jtitle = $_POST['jtitle'];
+ $company = $_POST['company'];
+ $country = $_POST['country'];
+ $email = $_POST['email'];
+ $mobile = $_POST['mobile'];
+ // get today date
+ $second=strtotime(date("H:i:s"))+(8*3600);
+ $today=gmdate("Y-m-d H:i:s",$second);
+ // query
+ $sql = 'insert into sh_email_alert (name,job_title,company,country,email,mobile,pubtime) values ("'.$uname.'","'.$jtitle.'","'.$company.'","'.$country.'","'.$email.'","'.$mobile.'","'.$today.'")';
+ $result = $wpdb->query($sql);
+ return $result;
+}
+// Update
+function sh_email_alert_update($id){
+ global $wpdb;
+ $uname = $_POST['uname'];
+ $jtitle = $_POST['jtitle'];
+ $company = $_POST['company'];
+ $country = $_POST['country'];
+ $email = $_POST['email'];
+ $mobile = $_POST['mobile'];
+ // get today date
+ $second=strtotime(date("H:i:s"))+(8*3600);
+ $today=gmdate("Y-m-d H:i:s",$second);
+ // query
+ $sql = 'update sh_email_alert set name="'.$uname.'", job_title="'.$jtitle.'", company="'.$company.'", country="'.$country.'", email="'.$email.'", mobile="'.$mobile.'", pubtime="'.$today.'" where id = '.$id;
+ $result = $wpdb->query($sql);
+ return $result;
+}
+// Delete
+function sh_email_alert_delete($id){
+ global $wpdb;
+ $sql = 'delete from sh_email_alert where id = '.$id;
+ $result = $wpdb->query($sql);
+ return $result;
+}
+
+?>
Oops, something went wrong.

0 comments on commit c8d3e5b

Please sign in to comment.