本文整理汇总了PHP中Agent::updateAgent方法的典型用法代码示例。如果您正苦于以下问题:PHP Agent::updateAgent方法的具体用法?PHP Agent::updateAgent怎么用?PHP Agent::updateAgent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::updateAgent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateagentAction
public function updateagentAction()
{
$lic = $_REQUEST['lic'];
if ($lic != $_SESSION['OPENZISKEYHOLE']) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
Zend_Session::regenerateId();
if (!$this->getRequest()->isXmlHttpRequest()) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
$empty = null;
$filterChain = new Zend_Filter();
$filterChain->addFilter(new Zend_Filter_StripTags());
$filterChain2 = new Zend_Filter();
$filterChain2->addFilter(new Zend_Filter_Digits());
$desc = $filterChain->filter($_POST['DESCRIPTION']);
$agentId = $filterChain->filter($_POST['ID']);
$sourceId = $filterChain->filter($_POST['SOURCE_ID']);
$password = $filterChain->filter($_POST['PASSWORD']);
$username = $filterChain->filter($_POST['USERNAME']);
$ipaddress = $empty;
$ip = isset($_POST['IPADDRESS']) ? $filterChain->filter($_POST['IPADDRESS']) : $empty;
$ip_str = substr($ip, 0, 3);
if ($ip_str != "ex:") {
$ipaddress = $ip;
}
$maxbuffer = $empty;
$max = isset($_POST['MAXBUFFERSIZE']) ? $filterChain->filter($_POST['MAXBUFFERSIZE']) : $empty;
$max_str = substr($max, 0, 3);
if ($max_str != "ex:") {
$maxbuffer = $filterChain2->filter($max);
}
$active = $filterChain->filter($_POST['ACTIVE']);
Agent::updateAgent($desc, $sourceId, $username, $password, $agentId, $ipaddress, $maxbuffer, $active);
$this->render('ajaxsuccessjson');
}
} else {
if (!$this->getRequest()->isXmlHttpRequest()) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
$this->view->msg = 'Invalid User';
$this->_forward('error', 'error');
}
}
}
}