本文整理汇总了PHP中Messages::getbyDomainId方法的典型用法代码示例。如果您正苦于以下问题:PHP Messages::getbyDomainId方法的具体用法?PHP Messages::getbyDomainId怎么用?PHP Messages::getbyDomainId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages::getbyDomainId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
/**
* editAction
* Get a record and populate the application form
* @return unknown_type
*/
public function editAction()
{
$form = $this->getForm('/domains/process');
$id = $this->getRequest()->getParam('id');
if (!empty($id) && is_numeric($id)) {
if (!empty($this->customer['customer_id']) && is_numeric($this->customer['customer_id'])) {
$customer_id = $this->customer['customer_id'];
}
// Get these fields before editing the form
// the field autorenew has been aliased in order to create a flat array and not a multidimentional array as proposed by the Doctrine engine
$fields = "domain_id, registrars_id, CONCAT('http://www.', d.domain, '.', ws.tld) as Domain, d.authinfocode as authinfocode, \n\t\t\tp.product_id as product_id, d.domain as domainame, ws.tld as tld, d.autorenew as autorenew, \n\t\t\tDATE_FORMAT(d.creation_date, '%d/%m/%Y') as Starting, (DATEDIFF(expiring_date, CURRENT_DATE)) as Days, \n\t\t\tDATE_FORMAT(d.expiring_date, '%d/%m/%Y') as Termination, s.status as Status";
$rs = $this->domains->getAllInfo($id, $customer_id, $fields, true);
if (empty($rs)) {
$this->_helper->redirector('index', 'domains', 'default', array('mex' => 'forbidden', 'status' => 'danger'));
}
$form->populate($rs[0]);
if ($rs[0]['autorenew']) {
$this->view->autorenew = true;
} else {
$this->view->autorenew = false;
}
// Some useful values
$this->view->name = $rs[0]['domainame'] . "." . $rs[0]['tld'];
$this->view->days = $rs[0]['Days'];
$this->view->domain_id = $id;
$this->view->productid = $rs[0]['product_id'];
// Show the list of the messages attached to this domain
$this->view->messages = Messages::getbyDomainId($id);
$this->view->tags = Tags::findConnectionbyDomainID($id);
$this->view->is_maintained = $rs[0]['registrars_id'];
$this->view->customerid = $customer_id;
$this->view->authinfocode = $rs[0]['authinfocode'];
$this->view->id = $id;
$this->view->orders = array('records' => domains::Orders($id), 'edit' => array('controller' => 'orders', 'action' => 'edit'));
$this->view->services = array('records' => domains::Services($id), 'edit' => array('controller' => 'services', 'action' => 'edit'));
$this->view->tasks = array('records' => DomainsTasks::getTasksbyDomainID($id));
// Hide these fields and values inside the vertical grid object
unset($rs[0]['autorenew']);
unset($rs[0]['authinfocode']);
unset($rs[0]['note']);
unset($rs[0]['domainame']);
unset($rs[0]['tld']);
// Sent the data to the datagrid
$this->view->datagrid = array('records' => $rs);
$this->view->dnsgrid = array('records' => Dns_Zones::getZones($id, true), 'delete' => array('controller' => 'domains', 'action' => 'deletednszone'));
}
$this->view->mex = $this->getRequest()->getParam('mex');
$this->view->mexstatus = $this->getRequest()->getParam('status');
$this->view->title = $this->translator->translate("Domain");
$this->view->description = $this->translator->translate("Here you can edit your own domain parameters.");
$this->view->form = $form;
$this->_helper->viewRenderer('customform');
}
示例2: editAction
/**
* editAction
* Get a record and populate the application form
* @return unknown_type
*/
public function editAction()
{
$form = $this->getForm('/admin/domains/process');
$this->view->title = $this->translator->translate("Domain Edit");
$this->view->description = $this->translator->translate("Here you can edit your own domain parameters.");
$id = $this->getRequest()->getParam('id');
if (!empty($id) && is_numeric($id)) {
// Create the buttons in the edit form
$this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/domains/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null)), array("url" => "/admin/domains/list", "label" => $this->translator->translate('List'), "params" => array('css' => null)), array("url" => "/admin/domains/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)), array("url" => "/admin/domains/newevent/id/{$id}", "label" => $this->translator->translate('Calendar Event'), "params" => array('css' => null)));
try {
$rs = $this->domains->find($id, null);
if (!empty($rs[0])) {
$rs[0]['creation_date'] = Shineisp_Commons_Utilities::formatDateOut($rs[0]['creation_date']);
$rs[0]['expiring_date'] = Shineisp_Commons_Utilities::formatDateOut($rs[0]['expiring_date']);
$rs[0]['status_id'] = $rs[0]['Statuses']['status_id'];
// Domains NicHandles
$rs[0]['owner'] = DomainsNichandle::getProfile($id);
$rs[0]['admin'] = DomainsNichandle::getProfile($id, "admin");
$rs[0]['tech'] = DomainsNichandle::getProfile($id, "tech");
$rs[0]['billing'] = DomainsNichandle::getProfile($id, "billing");
$form->populate($rs[0]);
if (!empty($rs[0]['DomainsTlds']['WhoisServers'])) {
$this->view->title = $rs[0]['domain'] . "." . $rs[0]['DomainsTlds']['WhoisServers']['tld'];
$this->view->titlelink = "http://" . $rs[0]['domain'] . "." . $rs[0]['DomainsTlds']['WhoisServers']['tld'];
$this->view->icon = "fa fa-globe";
}
$this->view->owner_datagrid = domains::ownerGrid($id);
$this->view->actions = Registrars::getActions($rs[0]['registrars_id']);
}
} catch (Exception $e) {
die($e->getMessage());
}
$this->view->id = $id;
// Get all the messages attached to the domain
$this->view->messages = Messages::getbyDomainId($id);
}
$this->view->mex = $this->getRequest()->getParam('mex');
$this->view->mexstatus = $this->getRequest()->getParam('status');
$this->view->dns_datagrid = Domains::dnsGrid();
$this->view->form = $form;
$this->view->services_datagrid = array('records' => domains::Services($id), 'edit' => array('controller' => 'services', 'action' => 'edit'));
$this->view->orders_datagrid = array('records' => domains::Orders($id), 'edit' => array('controller' => 'orders', 'action' => 'edit'));
$this->render('applicantform');
}