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


PHP Emails::getEmail方法代码示例

本文整理汇总了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");
	}
开发者ID:EuniceManyasi,项目名称:DVI,代码行数:54,代码来源:email_management.php


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