当前位置: 首页>>代码示例>>PHP>>正文


PHP email::emailTemplate方法代码示例

本文整理汇总了PHP中email::emailTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP email::emailTemplate方法的具体用法?PHP email::emailTemplate怎么用?PHP email::emailTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在email的用法示例。


在下文中一共展示了email::emailTemplate方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendEmailChangeMailAdmin

 public function sendEmailChangeMailAdmin($newEmail)
 {
     $to = ADMIN_EMAIL;
     $subject = 'AI Club - Email Changed';
     $arrData['{EMAIL}'] = $newEmail;
     $objEmail = new email();
     $EmailBody = $objEmail->emailTemplate('member_email_changed_admin', $arrData);
     $objEmail->sendmail($to, $subject, $EmailBody);
 }
开发者ID:business-expert,项目名称:aiclubnew,代码行数:9,代码来源:profile_model.php

示例2: sendPasswordChangedEmail1

 public function sendPasswordChangedEmail1($row)
 {
     global $objComm, $DB;
     $to = ADMIN_EMAIL;
     $subject = 'AI Club - Password Change‏‏d';
     $arrData['{NAME}'] = $row->fname;
     $arrData['{EMAIL}'] = $row->email_address;
     $arrData['{BIRTHDATE}'] = $row->birth_date;
     $objEmail = new email();
     $EmailBody = $objEmail->emailTemplate('new_password_changed', $arrData);
     $objEmail->sendmail($to, $subject, $EmailBody);
 }
开发者ID:business-expert,项目名称:aiclubnew,代码行数:12,代码来源:forgot_model.php

示例3: sendmail

 public function sendmail()
 {
     $to = $this->row->email_address;
     //$to 	 = 'rakesh.r.singh@hotmail.com';
     $subject = 'AI Club - Your Memeber account created successfully';
     $arrData['{FIRST_NAME}'] = $this->row->fname;
     $arrData['{EMAIL}'] = $this->row->email_address;
     $arrData['{PASSWORD}'] = $_REQUEST['data_password'];
     $arrData['{URL}'] = SITE_PATH . "/index.php";
     $objEmail = new email();
     $EmailBody = $objEmail->emailTemplate('member_login', $arrData);
     $objEmail->sendmail($to, $subject, $EmailBody);
 }
开发者ID:business-expert,项目名称:aiclubnew,代码行数:13,代码来源:verification_model.php

示例4: create

 public function create($uid, $amount, $due, $notes)
 {
     global $dbh, $postvar, $getvar, $instance;
     $client = $dbh->client($uid);
     $emailtemp = email::emailTemplate("new-invoice");
     $newinvoice_array['USER'] = $client['user'];
     $newinvoice_array['AMOUNT'] = main::addzeros($amount);
     $newinvoice_array['LINK'] = $dbh->config("url") . "/client/?page=invoices";
     $newinvoice_array['DUE'] = main::convertdate("n/d/Y", $due, $uid);
     $is_paid = $newinvoice_array['AMOUNT'] == "0.00" ? "1" : "0";
     email::send($client['email'], $emailtemp['subject'], $emailtemp['content'], $newinvoice_array);
     unset($where);
     $where[] = array("amount", "=", "0", "OR");
     $where[] = array("amount", "=", "0.00");
     $dbh->update("invoices", array("is_paid" => "1"), $where);
     //This way people won't see unpaid invoices for $0.
     $invoices_insert = array("uid" => $uid, "amount" => $amount, "created" => time(), "due" => $due, "notes" => $notes, "pay_now" => $amount, "is_paid" => $is_paid);
     $response = $dbh->insert("invoices", $invoices_insert);
     return $response;
 }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:20,代码来源:class_invoice.php

示例5: ApproveClientUpgrades

 private function ApproveClientUpgrades()
 {
     global $dbh, $postvar, $getvar, $instance;
     if (is_numeric($getvar['do'])) {
         $upgrade_stubid = $getvar['do'];
         $upgrade_stub_data = $dbh->select("upgrade", array("id", "=", $upgrade_stubid));
         $client = $dbh->client($upgrade_stub_data['uid']);
         $user_data = main::uidtopack($upgrade_stub_data['uid']);
         $new_pack_data = $dbh->select("packages", array("id", "=", $upgrade_stub_data['newpack']));
         if ($getvar['accept']) {
             switch ($upgrade_stub_data['flags']) {
                 case "2":
                     $dbh->update("upgrade", array("flags" => "1"), array("id", "=", $upgrade_stubid), "1");
                     if (upgrade::do_upgrade($upgrade_stubid, "Update", 1) === false) {
                         $dbh->update("upgrade", array("flags" => "2"), array("id", "=", $upgrade_stubid), "1");
                         echo "<br><br>";
                     } else {
                         main::errors("The user has been prepared for their upgrade at the end of their current billing cycle.<br>");
                     }
                     break;
                 case "3":
                     $dbh->update("upgrade", array("flags" => "4"), array("id", "=", $upgrade_stubid), "1");
                     if (upgrade::do_upgrade($upgrade_stubid, "Update", 1) === false) {
                         $dbh->update("upgrade", array("flags" => "3"), array("id", "=", $upgrade_stubid), "1");
                         echo "<br><br>";
                     } else {
                         main::errors("The user has been prepared for their upgrade <font color = '#779500'>on the new server</font> at the end of their current billing cycle.<br>");
                     }
                     break;
                 case "5":
                     $dbh->update("upgrade", array("flags" => "0"), array("id", "=", $upgrade_stubid), "1");
                     if (upgrade::do_upgrade($upgrade_stubid, "Update", 1) === false) {
                         $dbh->update("upgrade", array("flags" => "5"), array("id", "=", $upgrade_stubid), "1");
                         echo "<br><br>";
                     } else {
                         main::errors("The user has been upgraded.<br>");
                     }
                     break;
                 case "6":
                     $dbh->update("upgrade", array("flags" => "7"), array("id", "=", $upgrade_stubid), "1");
                     if (upgrade::do_upgrade($upgrade_stubid, "Update", 1) === false) {
                         $dbh->update("upgrade", array("flags" => "6"), array("id", "=", $upgrade_stubid), "1");
                         echo "<br><br>";
                     } else {
                         main::errors("The user has been upgraded and is now <font color = '#779500'>on the new server</font>.  Please be sure to remove the account on the old server when the user has migrated their website.<br>");
                     }
                     break;
             }
         } else {
             $dbh->delete("upgrade", array("id", "=", $upgrade_stubid), "1");
             main::errors("The user's upgrade request has been denied.<br>");
             $deny_array['OLDPLAN'] = $user_data['packages']['name'];
             $deny_array['NEWPLAN'] = $new_pack_data['name'];
             $uemaildata = email::emailTemplate("client-upgrade-denied");
             email::send($client['email'], $uemaildata['subject'], $uemaildata['content'], $deny_array);
             main::thtlog("Upgrade Denied", "Upgrade denied for " . $client['user'] . " <br><b>Current package: </b>" . $user_data['packages']['name'] . " <br><b>Requested package: </b>" . $new_pack_data['name'], $upgrade_stub_data['uid']);
         }
     }
     unset($where);
     $where[] = array("flags", "=", "2", "OR");
     $where[] = array("flags", "=", "3", "OR");
     $where[] = array("flags", "=", "5", "OR");
     $where[] = array("flags", "=", "6");
     $upgrade_req_query = $dbh->select("upgrade", $where, 0, 0, 1);
     if ($dbh->num_rows($upgrade_req_query) == 0) {
         echo "<ERRORS>No clients are awaiting upgrade approval.";
     } else {
         $tpl .= "<ERRORS>The users listed here have prequalified for upgrades, but admin approval was needed on the packages they selected.";
         while ($upgrade_req_data = $dbh->fetch_array($upgrade_req_query)) {
             $client = $dbh->client($upgrade_req_data['uid']);
             $user_data = main::uidtopack($upgrade_req_data['uid']);
             $new_pack_data = $dbh->select("packages", array("id", "=", $upgrade_req_data['newpack']));
             if ($upgrade_req_data['flags'] == "2" || $upgrade_req_data['flags'] == "3") {
                 $approve_upgrades_array['EFFECTIVE'] = "Next Billing Cycle";
             } else {
                 $approve_upgrades_array['EFFECTIVE'] = "Immediately";
             }
             $approve_upgrades_array['USER'] = $client['user'];
             $approve_upgrades_array['EMAIL'] = $client['email'];
             $approve_upgrades_array['DOMAIN'] = $user_data['user_data']['domain'];
             $approve_upgrades_array['OLDPLAN'] = $user_data['packages']['name'];
             $approve_upgrades_array['NEWPLAN'] = $new_pack_data['name'];
             $approve_upgrades_array['NEWSERVER'] = $user_data['packages']['server'] != $new_pack_data['server'] ? "<font color = '#FF0055'>Yes</font>" : "<font color = '#779500'>No</font>";
             $approve_upgrades_array['ID'] = $upgrade_req_data['id'];
             $approve_upgrades_array['CLIENTID'] = $upgrade_req_data['uid'];
             $tpl .= style::replaceVar("tpl/admin/upgrades/approve-upgrades.tpl", $approve_upgrades_array);
         }
         echo $tpl;
     }
 }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:90,代码来源:users.php

示例6: do_upgrade


//.........这里部分代码省略.........
     $adminmsg_array['NEWSERVER'] = $new_server_name;
     $adminmsg_array['OLDSERVER'] = $old_server_name;
     if ($immediate) {
         $adminmsg_array['NEXTMONTH_IMMEDIATELY'] = "immediately";
     } else {
         $adminmsg_array['NEXTMONTH_IMMEDIATELY'] = "next billing cycle";
     }
     $url = $dbh->config("url");
     if (ADMINDIR) {
         $admin_dir = ADMINDIR;
     } else {
         $admin_dir = "admin";
     }
     $adminmsg_array['APPROVE_LINK'] = $url . $admin_dir . "/?page=users&sub=upgrade";
     if ($upgrade) {
         if ($new_plan_data['type'] == "paid") {
             $new_invoice_text = "  A new invoice has been generated.";
             if ($current_pack_type == "paid" && $user_data['additional']['monthly'] >= $new_plan_additional['monthly']) {
                 unset($new_invoice_text);
             }
         }
         $serverfile = server::createServer($newpack);
         if ($new_server) {
             $new_serv_pass_for_email = time();
             $domsub = "sub";
             //Checks to see if the domain contains 3 or more segments and fails if there are more than 3 and if the last one two aren't TLD portions, it fails,
             //so we can see if this is a subdomain this way.
             if (check::domain($user_data['user_data']['domain'])) {
                 $domsub = "dom";
             }
             $done = $serverfile->signup(type::packageserver($newpack), $new_plan_data['reseller'], $username, $user_email, $new_serv_pass_for_email, $user_data['user_data']['domain'], type::packageBackend($newpack), $domsub);
             if ($done === true) {
                 if ($new_plan_data['reseller']) {
                     $uemaildata = email::emailTemplate("upgrade-newserv-resell-welcome");
                 } else {
                     $uemaildata = email::emailTemplate("upgrade-newserv-welcome");
                 }
                 $change_tht = 1;
                 main::errors("Your upgrade request has been completed.  An email has been sent to you detailing your upgraded account on the new server." . $new_invoice_text);
             } else {
                 return false;
             }
         } else {
             if ($serverfile->canupgrade) {
                 $done = $serverfile->do_upgrade($new_plan_data['server'], type::packageBackend($newpack), $username);
                 if ($done === true) {
                     if ($new_plan_data['reseller']) {
                         $uemaildata = email::emailTemplate("upgrade-resell-welcome");
                     } else {
                         $uemaildata = email::emailTemplate("upgrade-welcome");
                     }
                     $change_tht = 1;
                     main::errors("Your upgrade request has been completed.  An email has been sent to you detailing your upgraded account." . $new_invoice_text);
                 } else {
                     return false;
                 }
             } else {
                 $emaildata = email::emailTemplate("manual-upgrade-request");
                 main::errors("Your upgrade request has been added and the administrator has been emailed.");
             }
         }
         if ($uemaildata) {
             $welcomeemail_array['USER'] = $username;
             $welcomeemail_array['EMAIL'] = $user_email;
             $welcomeemail_array['PACKAGE'] = $newpack_name;
             $welcomeemail_array['SERVERIP'] = $new_server_data['ip'];
开发者ID:cozylife,项目名称:tht-reworked,代码行数:67,代码来源:class_upgrade.php

示例7: cron

 public function cron()
 {
     global $dbh, $postvar, $getvar, $instance;
     if ($dbh->config("p2hcheck") == "") {
         // Probably a new install. Cron has never run before.
         $dbh->updateConfig("p2hcheck", "0:0:0");
     }
     $checkdate = explode(":", $dbh->config("p2hcheck"));
     if ($checkdate === array($dbh->config("p2hcheck"))) {
         $dbh->updateConfig("p2hcheck", $dbh->config("p2hcheck") . ":0:0");
         $checkdate = explode(":", $dbh->config("p2hcheck"));
     } elseif (array_key_exists(1, $checkdate)) {
         if ($checkdate[1] == "") {
             $dbh->updateConfig("p2hcheck", $checkdate[0] . ":0:0");
             $checkdate = explode(":", $dbh->config("p2hcheck"));
         }
     }
     // If today is the last day of the month (and hasn't been run yet)
     if (date("d") == date("t") && ((int) $checkdate[0] < (int) date("m") || (int) $checkdate[0] == (int) date("m") && $checkdate[2] == "0")) {
         $users_query = $dbh->select("users");
         while ($users_data = $dbh->fetch_array($users_query)) {
             //Skip this user if its marked as a free user.
             if ($users_data['freeuser']) {
                 continue;
             }
             $ptype = type::packagetype($users_data['pid']);
             if ($ptype == "p2h") {
                 $fuser = type::userAdditional($users_data['id']);
                 $forum = type::additional($users_data['pid'], 'forum');
                 $this->con = $this->forumCon($forum);
                 $posts = coupons::totalposts($users_data['id']);
                 $mposts = $this->getMonthly($users_data['pid'], $users_data['id']);
                 if ($posts < $mposts) {
                     // If the user haven't posted enough...
                     $user = $dbh->client($users_data['id']);
                     $grace_period = $dbh->config("p2hgraceperiod");
                     //The grace period in days
                     $grace_period = $grace_period * 24 * 60 * 60;
                     if (strtotime(date("Y-m-d") . " 00:00:00") > $users_data['signup'] + $grace_period) {
                         //This gives the user a grace period.
                         // Suspend the user.
                         server::suspend($users_data['id'], "Only posted {$posts} post out of the required {$mposts} monthly posts");
                         // Output to the cron.
                         echo "<strong>" . $user['user'] . " (" . $fuser['fuser'] . "):</strong> Suspended for not posting the required amount. ({$posts} out of {$mposts})<br />";
                     }
                 }
             }
         }
         // We're done for this month. Prepare for the next.
         if (date("m") == 12) {
             $checkmonth = "0";
         } else {
             $checkmonth = date("m");
         }
     } elseif ((int) date("d") == $dbh->config("p2hwarndate") && (int) $checkdate[1] != 1) {
         $users_query = $dbh->select("users");
         while ($users_data = $dbh->fetch_array($users_query)) {
             //Skip this user if its marked as a free user.
             if ($users_data['freeuser']) {
                 continue;
             }
             $ptype = type::packagetype($users_data['pid']);
             if ($ptype == "p2h") {
                 $fuser = type::userAdditional($users_data['id']);
                 $forum = type::additional($users_data['pid'], 'forum');
                 $this->con = $this->forumCon($forum);
                 $posts = coupons::totalposts($users_data['id']);
                 $posts_text = main::s($posts, " Post");
                 $mposts = $this->getMonthly($users_data['pid'], $users_data['id']);
                 $mposts_text = main::s($mposts, " post");
                 $config_url_data = $dbh->select("p2h", array("forumname", "=", $forum));
                 $furl = $config_url_data['value'];
                 // If the user hasn't posted enough yet
                 $grace_period = $dbh->config("p2hgraceperiod");
                 //The grace period in days
                 $grace_period = $grace_period * 24 * 60 * 60;
                 $userinfo = $dbh->client($users_data['id']);
                 $signup_date = $userinfo['signup'];
                 if (date("m") != date("m", $signup_date + $grace_period)) {
                     //If they won't be suspended on this months check, then we don't need to warn them.
                     $no_email = 1;
                 }
                 if ($posts < $mposts && !$no_email) {
                     $emaildata = email::emailTemplate("p2h-low-post-warning");
                     $p2hwarning_array['USERPOSTS'] = $posts;
                     $p2hwarning_array['MONTHLY'] = $mposts;
                     $p2hwarning_array['URL'] = $furl;
                     // Warn the user that they still have some more posting to do!
                     email::send($users_data['email'], $emaildata['subject'], $emaildata['content'], $p2hwarning_array);
                     // Output to the cron.
                     echo "<strong>" . $users_data['user'] . " (" . $fuser['fuser'] . "):</strong> Warned for not yet posting the required monthly amount. ({$posts_text} posted out of {$mposts_text}/month)<br />";
                 }
             }
         }
         // This prevents the post warnings from being sent again today/this month.
         $dbh->updateConfig("p2hcheck", $checkdate[0] . ":1:0");
     }
 }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:98,代码来源:p2h.php

示例8: array

             $where[] = array("user", "=", $user, "AND");
             $where[] = array("email", "=", $user_email);
             $find_staff_query = $dbh->select("staff", $where, 0, 0, 1);
             if ($dbh->num_rows($find_staff_query) == 0) {
                 main::errors("That account doesn't exist!");
             } else {
                 $curstaff = $dbh->fetch_array($find_staff_query);
                 $password = rand(0, 999999);
                 $salt = crypto::salt();
                 $newpass = crypto::passhash($password, $salt);
                 $update_staff = array("password" => $newpass, "salt" => $salt);
                 $dbh->update("staff", $update_staff, array("id", "=", $curstaff['id']));
                 main::errors("Password reset!");
                 $forgotpass_email_array['PASS'] = $password;
                 $forgotpass_email_array['LINK'] = $dbh->config("url") . ADMINDIR;
                 $emaildata = email::emailTemplate("admin-password-reset");
                 email::send($user_email, $emaildata['subject'], $emaildata['content'], $forgotpass_email_array);
             }
         }
     }
     echo '<div align="center">' . main::table("Admin Area - Reset Password", style::replaceVar("tpl/admin/login/admin-password-reset.tpl"), "300px") . '</div>';
     echo style::get("footer.tpl");
 } else {
     define("SUB", "Login");
     define("INFO", "<b>Welcome to <NAME></b><br>" . SUB);
     if ($_POST) {
         // If user submitts form
         if (main::staffLogin($postvar['user'], $postvar['pass'])) {
             $queryString = $_SERVER["QUERY_STRING"];
             if ($queryString == "") {
                 $queryString = "page=home";
开发者ID:cozylife,项目名称:tht-reworked,代码行数:31,代码来源:index.php

示例9: content

 public function content()
 {
     global $dbh, $postvar, $getvar, $instance;
     if ($getvar['mode'] == 'ticketsall') {
         $no_tickets_msg = "You currently have no tickets.";
         $view_mode_text = "<center><i><u><a href=\"?page=tickets\" title=\"View open tickets\">View open tickets</a></u></i></center>";
     } else {
         $where[] = array("status", "!=", "3", "AND");
         $no_tickets_msg = "You currently have no new tickets! <i><u><a href=\"?page=tickets&mode=ticketsall\" title=\"View all tickets.\">View all tickets</a></u></i>";
         $view_mode_text = "<center><i><u><a href=\"?page=tickets&mode=ticketsall\" title=\"View all tickets\">View all tickets</a></u></i></center>";
     }
     if (!$getvar['do']) {
         $where[] = array("reply", "=", "0");
         $tickets_query = $dbh->select("tickets", $where, array("time", "DESC"), 0, 1);
         if (!$dbh->num_rows($tickets_query)) {
             echo $no_tickets_msg;
         } else {
             if ($getvar['mode'] == 'ticketsall') {
                 echo "<div style=\"display: none;\" id=\"nun-tickets\">You currently have no tickets!</div>";
             } else {
                 echo "<div style=\"display: none;\" id=\"nun-tickets\">You currently have no new tickets!</div>";
             }
             $num_rows = $dbh->num_rows($tickets_query);
             echo style::replaceVar("tpl/admin/tickets/tickets-js.tpl", array('NUM_TICKETS' => $num_rows));
             while ($tickets_data = $dbh->fetch_array($tickets_query)) {
                 $ticket_view_box_array['TITLE'] = $tickets_data['title'];
                 $ticket_view_box_array['UPDATE'] = $this->lastUpdated($tickets_data['id']);
                 $ticket_view_box_array['STATUS'] = $tickets_data['status'];
                 $ticket_view_box_array['STATUSMSG'] = $this->status($tickets_data['status']);
                 $ticket_view_box_array['ID'] = $tickets_data['id'];
                 $ticket_view_box_array['URGENCYTEXT'] = $tickets_data['urgency'];
                 $ticket_view_box_array['URGENCY_CLASS'] = strtolower(str_replace(" ", "_", $tickets_data['urgency']));
                 echo style::replaceVar("tpl/admin/tickets/ticket-view-box.tpl", $ticket_view_box_array);
             }
             echo $view_mode_text;
         }
     } else {
         unset($where);
         $where[] = array("id", "=", $getvar['do'], "OR");
         $where[] = array("ticketid", "=", $getvar['do']);
         $tickets_query = $dbh->select("tickets", $where, array("time", "ASC"), 0, 1);
         if (!$dbh->num_rows($tickets_query)) {
             echo "That ticket doesn't exist!";
         } else {
             if ($_POST) {
                 check::empty_fields(array("admin"));
                 if (!main::errors()) {
                     $time = time();
                     $tickets_insert = array("title" => $postvar['title'], "content" => $postvar['content'], "time" => $time, "userid" => $_SESSION['user'], "reply" => "1", "ticketid" => $getvar['do'], "staff" => "1");
                     $dbh->insert("tickets", $tickets_insert);
                     main::errors("Reply has been added!");
                     $last_ticket_data = $dbh->select("tickets", array("time", "=", $time), 0, "1");
                     $tickets_data = $dbh->fetch_array($tickets_query);
                     $client = $dbh->staff($_SESSION['user']);
                     $user = $dbh->client($tickets_data['userid']);
                     $template = email::emailTemplate("ticket-staff-responded");
                     $clientresponse_array['TITLE'] = $tickets_data['title'];
                     $clientresponse_array['STAFF'] = $client['name'];
                     $clientresponse_array['CONTENT'] = $postvar['content'];
                     $clientresponse_array['LINK'] = $dbh->config("url") . "/client/?page=tickets&sub=view&do=" . $last_ticket_data['ticketid'];
                     email::send($user['email'], $template['subject'], $template['content'], $clientresponse_array);
                     main::redirect("?page=tickets&sub=view&do=" . $getvar['do']);
                 }
             }
             $tickets_data = $dbh->fetch_array($tickets_query);
             $view_ticket_array['AUTHOR'] = $this->determineAuthor($tickets_data['userid'], $tickets_data['staff']);
             $view_ticket_array['TIME'] = main::convertdate("n/d/Y - g:i A", $tickets_data['time']);
             $view_ticket_array['NUMREPLIES'] = $dbh->num_rows($tickets_query) - 1;
             $view_ticket_array['UPDATED'] = $this->lastUpdated($tickets_data['id']);
             $view_ticket_array['ORIG'] = $this->showReply($tickets_data['id']);
             $view_ticket_array['URGENCY'] = $tickets_data['urgency'];
             $view_ticket_array['STATUS'] = $this->status($tickets_data['status']);
             switch ($tickets_data['status']) {
                 case "1":
                     $view_ticket_array['STATUSCOLOR'] = "779500";
                     break;
                 case "2":
                     $view_ticket_array['STATUSCOLOR'] = "FF9500";
                     break;
                 case "3":
                     $view_ticket_array['STATUSCOLOR'] = "FF0000";
                     break;
                 default:
                     $view_ticket_array['STATUSCOLOR'] = "000000";
                     break;
             }
             $view_ticket_array['REPLIES'] = "";
             $n = 0;
             while ($reply = $dbh->fetch_array($tickets_query)) {
                 if (!$n) {
                     $view_ticket_array['REPLIES'] .= "<br /><b>Replies</b>";
                 }
                 $view_ticket_array['REPLIES'] .= $this->showReply($reply['id']);
                 $n++;
             }
             $view_ticket_array['ADDREPLY'] .= "<br /><b>Change Ticket Status</b>";
             $values[] = array("Open", 1);
             $values[] = array("On Hold", 2);
             $values[] = array("Closed", 3);
             $change_status_array['DROPDOWN'] = main::dropdown("status", $values, $tickets_data['status'], 0);
//.........这里部分代码省略.........
开发者ID:cozylife,项目名称:tht-reworked,代码行数:101,代码来源:tickets.php

示例10: sendmail

 public function sendmail($to, $RandomString)
 {
     $subject = 'AI Club - verify your account';
     $arrData['{FIRST_NAME}'] = $this->arrField['fname'];
     $arrData['{URL}'] = SITE_PATH . "/verification.php?code=" . $RandomString;
     $objEmail = new email();
     $EmailBody = $objEmail->emailTemplate('member_register', $arrData);
     $objEmail->sendmail($to, $subject, $EmailBody);
 }
开发者ID:business-expert,项目名称:aiclubnew,代码行数:9,代码来源:member_model.php

示例11: content

 public function content()
 {
     global $dbh, $postvar, $getvar, $instance;
     switch ($getvar['sub']) {
         default:
             if ($_POST) {
                 check::empty_fields();
                 if (!main::errors()) {
                     $time = time();
                     $tickets_insert = array("title" => $postvar['title'], "content" => $postvar['content'], "urgency" => $postvar['urgency'], "time" => $time, "userid" => $_SESSION['cuser']);
                     $dbh->insert("tickets", $tickets_insert);
                     $last_ticket_data = $dbh->select("tickets", array("time", "=", $time), 0, "1");
                     $template = email::emailTemplate("new-ticket");
                     $newticket_array['TITLE'] = $postvar['title'];
                     $newticket_array['URGENCY'] = $postvar['urgency'];
                     $newticket_array['CONTENT'] = $postvar['content'];
                     $newticket_array['LINK'] = $dbh->config("url") . ADMINDIR . "/?page=tickets&sub=view&do=" . $last_ticket_data['id'];
                     email::staff($template['subject'], $template['content'], $newticket_array);
                     main::errors("Ticket has been added!");
                 }
             }
             echo style::replaceVar("tpl/client/tickets/add-ticket.tpl");
             break;
         case "view":
             if (is_numeric($getvar['deltid'])) {
                 $userid = $_SESSION['cuser'];
                 $tid = $getvar['deltid'];
                 unset($where);
                 $where[] = array("id", "=", $tid, "AND");
                 $where[] = array("userid", "=", $userid);
                 $user_check = $dbh->select("tickets", $where, 0, "1", 1);
                 $user_check_rows = $dbh->num_rows($user_check);
                 if ($user_check_rows == "0") {
                     echo "<font color = '#FF0000'>This ticket is not yours to delete or does not exist.</font><br>";
                 } else {
                     unset($where);
                     $where[] = array("id", "=", $tid, "OR");
                     $where[] = array("ticketid", "=", $tid);
                     $dbh->delete("tickets", $where);
                 }
             }
             if (!$getvar['do']) {
                 unset($where);
                 $where[] = array("userid", "=", $_SESSION['cuser'], "AND");
                 $where[] = array("reply", "=", "0");
                 $tickets_query = $dbh->select("tickets", $where, 0, 0, 1);
                 if (!$dbh->num_rows($tickets_query)) {
                     echo "You currently have no tickets!";
                 } else {
                     while ($tickets_data = $dbh->fetch_array($tickets_query)) {
                         $ticket_view_box_array['TITLE'] = $tickets_data['title'];
                         $ticket_view_box_array['UPDATE'] = $this->lastUpdated($tickets_data['id']);
                         $ticket_view_box_array['ID'] = $tickets_data['id'];
                         $ticket_view_box_array['STATUS'] = $tickets_data['status'];
                         $ticket_view_box_array['STATUSMSG'] = $this->status($tickets_data['status']);
                         echo style::replaceVar("tpl/client/tickets/ticket-view-box.tpl", $ticket_view_box_array);
                     }
                 }
             } else {
                 unset($where);
                 $where[] = array("id", "=", $getvar['do'], "OR");
                 $where[] = array("ticketid", "=", $getvar['do']);
                 $tickets_query = $dbh->select("tickets", $where, array("time", "ASC"), 0, 1);
                 if (!$dbh->num_rows($tickets_query)) {
                     echo "That ticket doesn't exist!";
                 } else {
                     if ($_POST) {
                         check::empty_fields();
                         if (!main::errors()) {
                             $time = time();
                             $tickets_insert = array("title" => $postvar['title'], "content" => $postvar['content'], "time" => $time, "userid" => $_SESSION['cuser'], "reply" => "1", "ticketid" => $getvar['do']);
                             $dbh->insert("tickets", $tickets_insert);
                             $last_ticket_data = $dbh->select("tickets", array("time", "=", $time), 0, "1");
                             $tickets_data = $dbh->fetch_array($tickets_query);
                             $client = $dbh->client($_SESSION['cuser']);
                             $template = email::emailTemplate("ticket-client-responded");
                             $newresponse_array['TITLE'] = $tickets_data['title'];
                             $newresponse_array['USER'] = $client['user'];
                             $newresponse_array['CONTENT'] = $postvar['content'];
                             $newresponse_array['LINK'] = $dbh->config("url") . ADMINDIR . "/?page=tickets&sub=view&do=" . $last_ticket_data['ticketid'];
                             email::staff($template['subject'], $template['content'], $newresponse_array);
                             main::redirect("?page=tickets&sub=view&do=" . $getvar['do']);
                         }
                     }
                     $tickets_data = $dbh->fetch_array($tickets_query);
                     $view_ticket_array['AUTHOR'] = $this->determineAuthor($tickets_data['userid'], $tickets_data['staff']);
                     $view_ticket_array['TIME'] = main::convertdate("n/d/Y - g:i A", $tickets_data['time']);
                     $view_ticket_array['NUMREPLIES'] = $dbh->num_rows($tickets_query) - 1;
                     $view_ticket_array['UPDATED'] = $this->lastUpdated($tickets_data['id']);
                     $view_ticket_array['ORIG'] = $this->showReply($tickets_data['id']);
                     $view_ticket_array['URGENCY'] = $tickets_data['urgency'];
                     $view_ticket_array['STATUS'] = $this->status($tickets_data['status']);
                     switch ($tickets_data['status']) {
                         case "1":
                             $view_ticket_array['STATUSCOLOR'] = "779500";
                             break;
                         case "2":
                             $view_ticket_array['STATUSCOLOR'] = "FF9500";
                             break;
                         case "3":
//.........这里部分代码省略.........
开发者ID:cozylife,项目名称:tht-reworked,代码行数:101,代码来源:tickets.php

示例12: unset

         if (!main::errors()) {
             $user = $postvar['user'];
             $email_reset = $postvar['email'];
             unset($where);
             $where[] = array("user", "=", $user, "AND");
             $where[] = array("email", "=", $email_reset);
             $client = $dbh->select("users", $where);
             if (!$client['user']) {
                 main::errors("That account doesn't exist!");
             } else {
                 $password = rand();
                 $cmd = main::changeClientPassword($client['id'], $password);
                 main::errors("Password reset!");
                 $forgot_pass_array['PASS'] = $password;
                 $forgot_pass_array['LINK'] = $dbh->config("url") . "/client";
                 $emaildata = email::emailTemplate("client-password-reset");
                 email::send($email_reset, $emaildata['subject'], $emaildata['content'], $forgot_pass_array);
             }
         }
     }
     echo '<div align="center">' . main::table("Client Area - Reset Password", style::replaceVar("tpl/client/login/client-password-reset.tpl"), "300px") . '</div>';
     echo style::get("footer.tpl");
 } else {
     define("SUB", "Login");
     define("INFO", "<b>Welcome to <NAME></b><br>" . SUB);
     if ($_POST) {
         if (main::clientLogin($postvar['user'], $postvar['pass'])) {
             main::redirect("?page=home");
         } else {
             main::errors("Incorrect username or password or account not active!");
         }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:31,代码来源:index.php

示例13: unsuspend

 public function unsuspend($id, $noemail = 0)
 {
     global $dbh, $postvar, $getvar, $instance;
     unset($where);
     $where[] = array("id", "=", $id, "AND");
     $where[] = array("status", "=", "2", "OR", 1);
     $where[] = array("status", "=", "3", "OR");
     $where[] = array("status", "=", "4", "", 1);
     $users_data = $dbh->select("users", $where);
     if (!$users_data['id']) {
         $error_array['Error'] = "That package doesn't exist or cannot be unsuspended!";
         $error_array['User PID'] = $id;
         main::error($error_array);
         return;
     } else {
         $server = type::packageserver($users_data['pid']);
         $serverfile = self::createServer($users_data['pid']);
         if ($serverfile->unsuspend($users_data['user'], $server) == true) {
             if (!$noemail) {
                 $emaildata = email::emailTemplate("account-unsuspended");
                 email::send($users_data['email'], $emaildata['subject'], $emaildata['content']);
                 $package_server_data = $dbh->select("servers", array("id", "=", type::packageserver($client['pid'])));
                 $admin_notifyunsuspend = email::emailTemplate("notify-admin-of-unsuspension");
                 $notifyunsuspend_array['USER'] = $users_data['user'];
                 $notifyunsuspend_array['SERV_TYPE'] = $package_server_data['type'];
                 $notifyunsuspend_array['SERV_NAME'] = $package_server_data['name'];
                 email::staff($admin_notifyunsuspend['subject'], $admin_notifyunsuspend['content'], $notifyunsuspend_array);
             }
             $dbh->update("users_bak", array("status" => "1"), array("id", "=", $users_data['id']));
             $dbh->update("users", array("status" => "1"), array("id", "=", $users_data['id']));
             main::thtlog("Client Account Unsuspended", "Unsuspended", $users_data['id']);
             return true;
         } else {
             return false;
         }
     }
 }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:37,代码来源:class_server.php


注:本文中的email::emailTemplate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。