Advertisement
Guest User

Untitled

a guest
May 3rd, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.37 KB | None | 0 0
  1. <?php
  2.  
  3. class Guest extends BaseController
  4. {
  5.  
  6. private $exptime = 1000;
  7. private $max_username = 15;
  8. private $min_username = 5;
  9. private $max_email = 60;
  10. private $min_email = 4;
  11. private $max_password = 100;
  12. private $min_password = 4;
  13.  
  14. function __construct()
  15. {
  16. Request::requiressl();
  17. $this->put_whois_online();
  18. if(Check::is_table("settings"))
  19. {
  20. Settings::load();
  21. }
  22. Auth::table("users");
  23. if(!Auth::check("users") && Check::is_routed("login") or Check::is_routed("signup") && !Auth::check("users"))
  24. {
  25. $exptime = time()+$this->exptime;
  26. Cookie::set("signup_exptime", $exptime);
  27. }
  28. }
  29.  
  30. public function get_hits($match="")
  31. {
  32. if(Check::this_referer())
  33. {
  34. echo Getdata::howmany("hits");
  35. }
  36. else
  37. {
  38. echo "0";
  39. }
  40. }
  41.  
  42. public function start_page($match="")
  43. {
  44. set("title2", l("start_browsing"));
  45. Template::view("startpage");
  46. }
  47.  
  48. public function index()
  49. {
  50. Request::requiressl();
  51. if(Auth::check("users"))
  52. {
  53. to_router("dashboard");
  54. }
  55. else
  56. {
  57. set("title2", l("home"));
  58. Template::view("home");
  59. }
  60. }
  61.  
  62. public function signup()
  63. {
  64. if(!Auth::check("users"))
  65. {
  66. if(Request::is_post())
  67. {
  68. if(Request::is_ajax())
  69. {
  70. $this->post_signup();
  71. $this->makejson();
  72. }
  73. else if(!Request::is_ajax())
  74. {
  75. $this->post_signup();
  76. }
  77. }
  78. set("title2", l("signup"));
  79. Template::view("signup");
  80. }
  81. else
  82. {
  83. to_router("home");
  84. }
  85. }
  86.  
  87. public function login()
  88. {
  89. if(!Auth::check("users"))
  90. {
  91. if(Request::is_post())
  92. {
  93. if(Request::is_ajax())
  94. {
  95. $this->post_login();
  96. $this->makejson();
  97. }
  98. else if(!Request::is_ajax())
  99. {
  100. $this->post_login();
  101. }
  102. }
  103. set("title2", l("login"));
  104. Template::view("login");
  105. }
  106. else
  107. {
  108. to_router("home");
  109. }
  110. }
  111.  
  112. public function redir_ref($match="")
  113. {
  114. if(!Auth::check("users"))
  115. {
  116. $id = $match["params"]["id"];
  117. if(!empty($id))
  118. {
  119. Referrals::remember($id);
  120. }
  121. to_router("home");
  122. }
  123. else
  124. {
  125. to_router("home");
  126. }
  127. }
  128.  
  129. public function rest()
  130. {
  131. if(!Auth::check("users"))
  132. {
  133. if(Request::is_post())
  134. {
  135. if(Request::is_ajax())
  136. {
  137. $this->send_rest();
  138. $this->makejson();
  139. }
  140. else if(!Request::is_ajax())
  141. {
  142. $this->send_rest();
  143. }
  144. }
  145. set("title2", l("rest"));
  146. Template::view("rest");
  147. }
  148. else
  149. {
  150. to_router("home");
  151. }
  152. }
  153.  
  154. public function resend()
  155. {
  156. if(!Auth::check("users"))
  157. {
  158. if(Request::is_post())
  159. {
  160. if(Request::is_ajax())
  161. {
  162. $this->resend_confirmation();
  163. $this->makejson();
  164. }
  165. else if(!Request::is_ajax())
  166. {
  167. $this->resend_confirmation();
  168. }
  169. }
  170. set("title2", l("resend"));
  171. Template::view("resend_confirmation");
  172. }
  173. else
  174. {
  175. to_router("home");
  176. }
  177. }
  178.  
  179. public function contact()
  180. {
  181. if(Request::is_post())
  182. {
  183. if(Request::is_ajax())
  184. {
  185. $this->post_contact();
  186. $this->makejson();
  187. }
  188. else if(!Request::is_ajax())
  189. {
  190. $this->post_contact();
  191. }
  192. }
  193. set("title2", l("contact"));
  194. Template::view("contact");
  195. }
  196.  
  197. public function howitwork()
  198. {
  199. set("title2", l("howitwork"));
  200. Template::view("howitwork");
  201. }
  202.  
  203. public function page($match="")
  204. {
  205. $name = strip_tags($match["params"]["name"]);
  206. $page = s("pages");
  207. $pages = array_keys($page);
  208. if(in_array($name, $pages))
  209. {
  210. if($name=="privacy"){ set("title2", l("privacy")); set("name", l("privacy")); }
  211. if($name=="tos"){ set("title2", l("tos")); set("name", l("tos")); }
  212. if($name=="about-us"){ set("title2", l("about_us")); set("name", l("about_us")); }
  213. set("content", $page[$name]);
  214. Template::view("page");
  215. }
  216. else
  217. {
  218. to_router("home");
  219. }
  220. }
  221.  
  222. public function post_login($match="")
  223. {
  224. $time = time()+86400*366;
  225. Auth::remember($time);
  226. Session::lifetime($time);
  227. $username = strip_tags(Request::post("login_username"));
  228. $password = Request::post("login_password");
  229. $provider = strip_tags(Request::get("provider"));
  230. if(!empty($username))
  231. {
  232. if(Auth::login($username, $password))
  233. {
  234. $deflangue = u("language");
  235. if(!empty($deflangue))
  236. {
  237. Languages::changeto($deflangue);
  238. }
  239. if(!Request::is_ajax())
  240. {
  241. Request::redir_to_referer();
  242. }
  243. define("alert_success", l("success_login"));
  244. }
  245. else
  246. {
  247. define("alert_error", l("error_login", "Nazwa użytkownika lub hasło jest nieprawidłowe. Spróbuj ponownie."));
  248. }
  249. }
  250. else if(!empty($provider))
  251. {
  252. if(Auth::social_login($username, $password))
  253. {
  254. if(!Request::is_ajax())
  255. {
  256. Request::redir_to_referer();
  257. }
  258. define("alert_success", l("success_login"));
  259. }
  260. else
  261. {
  262. define("alert_error", l("error_social_login", "Coś poszło nie tak... Spróbuj ponownie."));
  263. }
  264. }
  265. }
  266.  
  267. private function post_signup($match="")
  268. {
  269. $exptime = time()+$this->exptime;
  270. if(!Auth::check("users") && Request::is_post())
  271. {
  272. $exptime = Cookie::get("signup_exptime");
  273. $timenow = time();
  274. if(!empty($exptime) && $exptime > $timenow)
  275. {
  276. $username = strtolower(Request::post("signup_username"));
  277. $email = strtolower(Request::post("signup_email"));
  278. $password = Request::post("signup_password");
  279. $password2 = Request::post("signup_password2");
  280. $agree = Request::post("signup_agree");
  281. if(!empty($username) && !empty($email) && !empty($password) && !empty($password2) && !empty($agree))
  282. {
  283. if(Check::is_safe($username, "iaA") && Check::is_email($email))
  284. {
  285. if($password == $password2)
  286. {
  287. $check_lenght = $this->check_length(Request::post("signup_username"), Request::post("signup_email"), Request::post("signup_password"));
  288. if($check_lenght[0])
  289. {
  290. if(!Auth::check_username($username))
  291. {
  292. if(!Auth::check_email($email))
  293. {
  294. $activation = s("mail/activation");
  295. if($activation == "1")
  296. {
  297. $status = "0";
  298. $activator = Encryption::generate();
  299. }
  300. else
  301. {
  302. $status = "1";
  303. $activator = "";//Encryption::generate()
  304. }
  305. $info = array(
  306. "username" => $username,
  307. "email" => $email,
  308. "password" => $password,
  309. "status" => $status,
  310. "activator" => $activator
  311. );
  312.  
  313. Db::bind("username", $info["username"]);
  314. Db::bind("email", strtolower($info["email"]));
  315. Db::bind("password", Encryption::encode($info["password"]));
  316. Db::bind("activation", $info["activator"]);
  317. Db::bind("websites", s("defaults/website_slots"));
  318. Db::bind("sessions", s("defaults/session_slots"));
  319. Db::bind("tratio", s("defaults/traffic_ratio"));
  320. Db::bind("points", s("defaults/points"));
  321. Db::bind("createdat", time());
  322. Db::bind("updatedat", time());
  323. Db::bind("status", $info["status"]);
  324. $query = "INSERT into `users` (`username`, `email`, `password`, `website_slots`, `session_slots`, `traffic_ratio`, `points`, `status`, `activation_key`, `created_at`, `updated_at`) VALUES (:username, :email, :password, :websites, :sessions, :tratio, :points, :status, :activation, :createdat, :updatedat);";
  325. $ex = Db::query($query);
  326. if($ex)
  327. {
  328. $newid = Db::insert_id("users");
  329. $ref = Cookie::get("ref");
  330. if(!empty($ref) && !empty($newid))
  331. {
  332. Referrals::add($ref, $newid);
  333. }
  334.  
  335. if($activation == "1")
  336. {
  337. $checkmail = $this->send_activation(array(
  338. "email" => $email,
  339. "activation" => $activator
  340. ));
  341. if($checkmail)
  342. {
  343. define("alert_success", l("success_signup_mailed"));
  344. }
  345. else
  346. {
  347. define("alert_error", l("error_mail"));
  348. }
  349. }
  350. else
  351. {
  352. $time = time()+86000*2;
  353. Auth::remember($time);
  354. Auth::login($email, $password);
  355.  
  356. if(Request::is_ajax())
  357. {
  358. define("alert_success", l("success_signup"));
  359. }
  360. else
  361. {
  362. to_router("home");
  363. }
  364. }
  365. }
  366. else
  367. define("alert_error", l("error_server", "Przepraszamy, spróbuj ponownie później.Sorry please try Later !"));
  368. }
  369. else
  370. {
  371. Request::remove("signup_email");
  372. define("alert_error", l("error_email_exists", "Ten adres E-mail już jest zarejestrowany!"));
  373. }
  374. }
  375. else
  376. {
  377. Request::remove("signup_username");
  378. define("alert_error", l("error_username_exists", "Ten użytkownik już jest zarejestrowany!"));
  379. }
  380. }
  381. else
  382. {
  383. Request::remove("signup_password");
  384. Request::remove("signup_password2");
  385. define("alert_error", $check_lenght[1]);
  386. }
  387. }
  388. else
  389. {
  390. define("alert_error", l("error_match_password", "Hasła się nie zgadzają."));
  391. }
  392. }
  393. else
  394. {
  395. Request::remove("signup_username");
  396. define("alert_error", l("error_username_char", "Znaki dozwolone dla użytkownika (a-z A-Z 0-9)"));
  397. }
  398. }
  399. else if(!empty($username) && !empty($email) && !empty($password) && !empty($password2) && empty($agree))
  400. {
  401. define("alert_error", l("error_agree", "Muszisz zaakceptować nasz Regulamin korzystania z usług."));
  402. }
  403. else
  404. {
  405. define("alert_error", l("error_empty", "Proszę wypełnij wszystkie pola!"));
  406. }
  407. }
  408. else
  409. {
  410. Cookie::set("signup_exptime", $exptime);
  411. define("alert_error", l("error_exptime", "Sesja wygasła - spróbuj odświeżyć przeglądarkę."));
  412. }
  413.  
  414. }
  415. }
  416.  
  417. private function check_length($username, $email, $password)
  418. {
  419. if(!Check::is_max($username, $this->max_username, true))
  420. return array(false, l("error_max_username", "Sorry ! username is longer than necessary, the Maximum is")." ".$this->max_username." ".l("char", "characters") );
  421. else if(!Check::is_min($username, $this->min_username, true))
  422. return array(false, l("error_min_username", "Sorry ! username is very small, the minimum is")." ".$this->min_username." ".l("char", "characters") );
  423. else if(!Check::is_max($email, $this->max_email, true))
  424. return array(false, l("error_max_email", "Sorry ! email is longer than necessary, the Maximum is")." ".$this->max_email." ".l("char", "characters") );
  425. else if(!Check::is_min($email, $this->min_email, true))
  426. return array(false, l("error_min_email", "Sorry ! email is very small, the minimum is")." ".$this->min_email." ".l("char", "characters") );
  427. else if(!Check::is_max($password, $this->max_password))
  428. return array(false, l("error_max_password", "Sorry ! password is longer than necessary, the Maximum is")." ".$this->max_password." ".l("char", "characters") );
  429. else if(!Check::is_min($password, $this->min_password))
  430. return array(false, l("error_min_password", "Sorry ! password is very small, the minimum is")." ".$this->min_password." ".l("char", "characters") );
  431. else
  432. return array(true, "");
  433. }
  434.  
  435. private function send_activation($info)
  436. {
  437. $url = router("confirm_account", array("key" => $info["activation"], "email" => Encryption::encode($info["email"])));
  438. $message = MailTemplate::make(
  439. "sample1",
  440. array(
  441. "bg_header" => "#333",
  442. "bg_footer" => "#333",
  443. "logo_url" => s("generale/logo"),
  444. "logo_alt" => s("generale/name")." - Activation Link",
  445. "title" => "One more step - Activation",
  446. "message" => "
  447. Hi Dear,<br>
  448. We are glad to joining us, there is one more step to complete registration<br>
  449. E-mail: ".$info["email"]."<br>
  450. Confirm: <a href='".$url."' > >>Confirm your account<< </a><br>
  451. Thanks<br>",
  452. "footer_content" => "".s("generale/name")." - Copyright © ".date("Y")
  453. ));
  454.  
  455. $send["to"] = $info["email"];
  456. $send["message"] = $message;
  457. $send["subject"] = s("name")." - complete registration";
  458. $res = Mail::send($send);
  459. if($res[0])
  460. {
  461. return true;
  462. }
  463. else
  464. {
  465. return false;
  466. }
  467. }
  468.  
  469. public function get_activation($match="")
  470. {
  471. $email = Encryption::decode(strip_tags($match["params"]["email"]));
  472. $key = strip_tags($match["params"]["key"]);
  473. if(!empty($email) && !empty($key))
  474. {
  475. Db::bind("emailone", $email);
  476. $check_key = Db::query("SELECT activation_key FROM `users` WHERE email = :emailone");
  477. Db::bind("emailtwo", $email);
  478. $id = Db::query("SELECT id FROM `users` WHERE email = :emailtwo");
  479. $id = $id[0]["id"];
  480. }
  481. else
  482. {
  483. to_router("404");
  484. }
  485.  
  486. if($check_key[0]["activation_key"]==$key && !empty($id))
  487. {
  488. Db::bind("id", $id);
  489. Db::query("UPDATE `users` SET `activation_key` = '', `status` = '1' WHERE id = :id");
  490. to_router("login");
  491. }
  492. else
  493. {
  494. to_router("404");
  495. }
  496. }
  497.  
  498. public function post_contact($match="")
  499. {
  500. $name = strip_tags(Request::post("contact_name"));
  501. $email = strip_tags(Request::post("contact_email"));
  502. $message = strip_tags(Request::post("contact_message"));
  503.  
  504. $code = Request::post("g-recaptcha-response");
  505. $privatekey = s("recaptcha/privatekey");
  506. $recaptcha = new ReCaptcha\ReCaptcha($privatekey);
  507. $resp = $recaptcha->verify($code, $_SERVER["REMOTE_ADDR"]);
  508. if(empty($code) or !$resp->isSuccess())
  509. {
  510. define("alert_error", l("error_recaptcha"));
  511.  
  512. }
  513. else if(empty($email) or empty($name) or empty($message))
  514. {
  515. define("alert_error", l("error_empty"));
  516. }
  517. else if(!Check::is_email($email))
  518. {
  519. define("alert_error", l("error_email"));
  520.  
  521. }
  522. else if(Check::is_email($email))
  523. {
  524. $message = MailTemplate::make(
  525. "sample1",
  526. array(
  527. "bg_header" => "#333",
  528. "bg_footer" => "#333",
  529. "logo_url" => s("generale/logo"),
  530. "logo_alt" => "A new message from your website - ".s("generale/name"),
  531. "title" => "A new message from your website - ".s("generale/name"),
  532. "message" => "
  533. Hi Admin,<br>
  534. You've a new Message from your website - ".s("generale/name")."<br>
  535. Date: ".date("Y.m.d h:i:s")."<br>
  536. E-mail: ".$email."<br>
  537. Ip: ".Sys::ip()."<br>
  538. Message: ".str_replace("\n", "<br>", $message)."<br>",
  539. "footer_content" => "".s("generale/name")." - Copyright © ".date("Y")
  540. ));
  541. $to = s("mail/from");
  542. if(!empty($to))
  543. {
  544. $send["to"] = s("mail/from");
  545. $send["from"] = s("mail/from");
  546. $send["message"] = $message;
  547. $send["subject"] = "A new message from your website - ".s("generale/name");
  548. $res = Mail::send($send);
  549. if($res[0])
  550. {
  551. define("alert_success", l("success"));
  552.  
  553. }
  554. else
  555. {
  556. define("alert_error", l("error_mail"));
  557.  
  558. }
  559. }
  560. else
  561. {
  562. define("alert_error", l("error_server"));
  563.  
  564. }
  565. }
  566. else
  567. {
  568. define("alert_error", l("error_email_noexists"));
  569.  
  570. }
  571. }
  572.  
  573. public function send_rest($match="")
  574. {
  575.  
  576. $email = strip_tags(Request::post("rest_email"));
  577.  
  578. $code = Request::post("g-recaptcha-response");
  579. $privatekey = s("recaptcha/privatekey");
  580. $recaptcha = new ReCaptcha\ReCaptcha($privatekey);
  581. $resp = $recaptcha->verify($code, $_SERVER["REMOTE_ADDR"]);
  582. if(!$resp->isSuccess())
  583. {
  584. define("alert_error", l("error_recaptcha"));
  585.  
  586. }
  587. else if(empty($email))
  588. {
  589. define("alert_error", l("error_empty"));
  590.  
  591. }
  592. else if(!Check::is_email($email))
  593. {
  594. define("alert_error", l("error_email"));
  595.  
  596. }
  597. else if(Auth::check_email($email))
  598. {
  599. Db::bind("email", $email);
  600. $user = Db::query("SELECT * FROM users WHERE email = :email");
  601. $keep = false;
  602. if(!empty($user[0]))
  603. {
  604. if(empty($user[0]["provider_name"]))
  605. {
  606. $keep = true;
  607. }
  608. else
  609. {
  610. $keep = false;
  611. define("alert_error", l("error_email_noexists"));
  612. }
  613. }
  614. else
  615. {
  616. $keep = false;
  617. define("alert_error", l("error_email_noexists"));
  618. }
  619. if($keep)
  620. {
  621. $new_password = Encryption::randomstring(10);
  622. $new_hash = Encryption::encode($new_password);
  623. $exp_time = time()+86400*2;
  624. Db::bind("emailone", $email);
  625. $getid = Db::query("SELECT id from `users` WHERE email = :emailone");
  626. $id = $getid[0]["id"];
  627. $message = MailTemplate::make(
  628. "sample1",
  629. array(
  630. "bg_header" => "#333",
  631. "bg_footer" => "#333",
  632. "logo_url" => s("generale/logo"),
  633. "logo_alt" => s("generale/name")." - Przywrócenie hasła",
  634. "title" => "Mamy dobre wieści!",
  635. "message" => "
  636. Witaj,<br><br>
  637. Odpowiadając na Twoją prośbę z dnia ".date("Y.m.d h:i:s").", wygenerowaliśmy dla Ciebie nowe hasło.<br><br>
  638. E-mail: ".$email."<br>
  639. Nowe hasło: ".$new_password."<br>
  640. Link do hasła: <a href='".router("confirm_rest", array("id" => $id, "key" => $new_hash))."' >Potwierdź nowe hasło</a><br><br>
  641. <i>UWAGA! Ten link jest ważny do: ".date("Y.m.d h:i:s", $exp_time)."</i><br>",
  642. "footer_content" => "".s("generale/name")." - Copyright © ".date("Y")
  643. ));
  644. Db::bind("exptime", $exp_time);
  645. Db::bind("newkey", $new_hash);
  646. Db::bind("uid", $id);
  647. $query = "UPDATE `users` SET `rest_date` = :exptime, `rest_key` = :newkey WHERE id = :uid";
  648. $update = Db::query($query);
  649. if($update)
  650. {
  651. $send["to"] = $email;
  652. $send["message"] = $message;
  653. $send["subject"] = s("generale/name")." - Przypomnienie hasła";
  654. $res = Mail::send($send);
  655. if($res[0])
  656. {
  657. define("alert_success", l("success_mail"));
  658.  
  659. }
  660. else
  661. {
  662. define("alert_error", l("error_mail"));
  663.  
  664. }
  665. }
  666. else
  667. {
  668. define("alert_error", l("error_server"));
  669.  
  670. }
  671. }
  672. }
  673. else
  674. {
  675. define("alert_error", l("error_email_noexists"));
  676.  
  677. }
  678. }
  679.  
  680. public function resend_confirmation($match="")
  681. {
  682. $email = strip_tags(Request::post("resend_email"));
  683. $code = Request::post("g-recaptcha-response");
  684. $privatekey = s("recaptcha/privatekey");
  685. $recaptcha = new ReCaptcha\ReCaptcha($privatekey);
  686. $resp = $recaptcha->verify($code, $_SERVER["REMOTE_ADDR"]);
  687. if(empty($code) or !$resp->isSuccess())
  688. {
  689. define("alert_error", l("error_recaptcha"));
  690.  
  691. }
  692. else if(empty($email))
  693. {
  694. define("alert_error", l("error_empty"));
  695.  
  696. }
  697. else if(!Check::is_email($email))
  698. {
  699. define("alert_error", l("error_email"));
  700.  
  701. }
  702. else if(!Auth::check_email($email))
  703. {
  704. define("alert_error", l("error_email_noexists"));
  705. }
  706. else if(Auth::check_email($email))
  707. {
  708. Db::bind("email", strip_tags($email));
  709. $info = Db::query("SELECT * from users WHERE email = :email");
  710. $info = $info[0];
  711. if(!empty($info) && !empty($info["activation_key"]))
  712. {
  713. $email = strip_tags(Request::post("resend_email"));
  714. $url = router("confirm_account", array("key" => $info["activation_key"], "email" => Encryption::encode($info["email"])));
  715. $message = MailTemplate::make(
  716. "sample1",
  717. array(
  718. "bg_header" => "#333",
  719. "bg_footer" => "#333",
  720. "logo_url" => s("generale/logo"),
  721. "logo_alt" => s("generale/name")." - New Activation Link",
  722. "title" => "One more step - Activation",
  723. "message" => "
  724. Hi Dear,<br>
  725. We are glad to joining us, there is one more step to complete registration<br>
  726. E-mail: ".$info["email"]."<br>
  727. Confirm: <a href='".$url."' > >>Confirm your account<< </a><br>
  728. Thanks<br>",
  729. "footer_content" => "".s("generale/name")." - Copyright © ".date("Y")
  730. ));
  731.  
  732. $send["to"] = $info["email"];
  733. $send["message"] = $message;
  734. $send["subject"] = s("name")." - complete registration (New) ";
  735. $res = Mail::send($send);
  736. if($res[0])
  737. {
  738. define("alert_success", l("success_mail"));
  739. }
  740. else
  741. {
  742. define("alert_error", l("error_mail"));
  743. }
  744. }
  745. else
  746. {
  747. define("alert_error", l("error_already_activated"));
  748. }
  749. }
  750. }
  751.  
  752. public function confirm_rest($match="")
  753. {
  754. $id = strip_tags($match["params"]["id"]);
  755. $key = strip_tags($match["params"]["key"]);
  756. if(!empty($id) && !empty($key))
  757. {
  758. Db::bind("id", $id);
  759. $check_key = Db::query("SELECT rest_key FROM `users` WHERE id = :id");
  760. $check_key = $check_key[0]["rest_key"];
  761. }
  762. else
  763. {
  764. to_router("404");
  765. }
  766.  
  767. if($check_key===$key && !empty($check_key))
  768. {
  769. Db::bind("newpass", $check_key);
  770. Db::bind("id", $id);
  771. Db::query("UPDATE `users` SET `rest_key` = '', `rest_date` = '', `password` = :newpass WHERE id = :id");
  772. to_router("login");
  773. }
  774. else
  775. {
  776. to_router("404");
  777. }
  778. }
  779.  
  780. public function ping_newsletteres($match="")
  781. {
  782. $key = Encryption::decode($match["params"]["key"]);
  783. if($key == "newsletteres")
  784. {
  785. $errors = Request::get("errors", "a");
  786. $ex = Newsletteres::send();
  787. if($errors == "show")
  788. {
  789. echo "<pre>";
  790. print("Results: ".$ex."<br>");
  791.  
  792. print_r(Newsletteres::errors());
  793. echo "</pre>";
  794. }
  795. }
  796. }
  797. }
  798.  
  799. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement