20 lines
484 B
PHP
20 lines
484 B
PHP
<?php
|
|
|
|
class Configemail extends CI_Controller
|
|
{
|
|
function config() {
|
|
$this->db_onedev = $this->load->database("onedev", true);
|
|
$sql = "select * from m_emailconfig where M_EmailConfigIsActive = 'Y'
|
|
limit 0,1";
|
|
$qry = $this->db_onedev->query($sql);
|
|
if ($qry) {
|
|
$rows = $qry->result_array();
|
|
if (count($rows) > 0 ) {
|
|
echo json_encode($rows[0]);
|
|
exit;
|
|
}
|
|
}
|
|
echo json_encode( array());
|
|
}
|
|
}
|