本文整理汇总了PHP中Emails::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Emails::getEmail方法的具体用法?PHP Emails::getEmail怎么用?PHP Emails::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Emails
的用法示例。
在下文中一共展示了Emails::getEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save() {
$record_id = $this -> input -> post('record_id');
//Check if we are in editing mode first; if so, retrieve the edited record. if not, create a new one!
if (strlen($record_id) > 0) {
$email = Emails::getEmail($record_id);
} else {
$email = new Emails();
}
$div = $this -> session -> userdata('user_group');
//getting the session user group
$div2 = $this -> session -> userdata('district_province_id');
if ($div == 1) {
$national = "1";
$district = "0";
$provincial = "0";
}
if ($div == 2) {
$national = "1";
$district = "0";
$provincial = "0";
}
if ($div == 3) {
$national = "0";
$district = "0";
$provincial = $div2;
}
if ($div == 4) {
$provincial = "0";
$national = "0";
$district = $div2;
}
$email -> email = $this -> input -> post("email");
$email -> provincial = $provincial;
$email -> district = $district;
$email -> national = $national;
$email -> valid = "1";
$email -> stockout = $this -> input -> post("combo1");
$email -> consumption = $this -> input -> post("combo2");
$email -> coldchain = $this -> input -> post("combo3");
$email -> recepient = $this -> input -> post("rep");
$email -> number = $this -> input -> post("number");
$kenya=$country->country_code=trim($this->input->post("country_code"));
$email->number=$kenya.$this->input->post("number");
$email -> save();
redirect("email_management");
}