本文整理匯總了PHP中unknown_type::linkAdd方法的典型用法代碼示例。如果您正苦於以下問題:PHP unknown_type::linkAdd方法的具體用法?PHP unknown_type::linkAdd怎麽用?PHP unknown_type::linkAdd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類unknown_type
的用法示例。
在下文中一共展示了unknown_type::linkAdd方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _linkAdd
private function _linkAdd()
{
$this->_modelLyLink = $this->_getGlobalData('Model_LyLink', 'object');
$gameTypes = $this->_modelLyLink->getMyGame();
$operators = $this->_modelLyLink->getMyOperator();
$linkType = $this->_modelLyLink->getType();
if ($this->_isPost()) {
$_POST['game_type_id'] = intval($_POST['game_type_id']);
if (!$_POST['game_type_id'] || !array_key_exists($_POST['game_type_id'], $gameTypes)) {
$this->_utilMsg->showMsg(Tools::getLang('PLZ_SLT_GAME', 'Common'), -1, 2);
}
$_POST['operator_id'] = intval($_POST['operator_id']);
if (!$_POST['operator_id'] || !array_key_exists($_POST['operator_id'], $operators)) {
$this->_utilMsg->showMsg(Tools::getLang('PLZ_SLT_OPERATOR', 'Common'), -1, 2);
}
$_POST['link_type'] = intval($_POST['link_type']);
if (!$_POST['link_type'] || !array_key_exists($_POST['link_type'], $linkType)) {
$this->_utilMsg->showMsg(Tools::getLang('PLZ_SLT_LINK_TYPE', __CLASS__), -1, 2);
}
if (trim($_POST['title']) == '') {
$this->_utilMsg->showMsg(Tools::getLang('TITLE_NEED', __CLASS__), -1, 2);
}
if (trim($_POST['href']) == '') {
$this->_utilMsg->showMsg(Tools::getLang('LINK_NEED', __CLASS__), -1, 2);
}
$this->_modelLyLink->linkAdd();
$this->_utilMsg->showMsg(Tools::getLang('OPERATION_SUCCESS', 'Common'), 1, $this->_url['Link'], 1);
}
$this->_view->assign('gameTypes', $gameTypes);
$this->_view->assign('operators', $operators);
$this->_view->assign('linkType', $linkType);
$this->_view->display();
}
示例2: _psdLinkAdd
private function _psdLinkAdd()
{
$this->_modelLyPsdLink = $this->_getGlobalData('Model_LyPsdLink', 'object');
$gameTypes = $this->_modelLyPsdLink->getMyGame();
if ($this->_isPost()) {
$_POST['game_type_id'] = intval($_POST['game_type_id']);
if (!$_POST['game_type_id'] || !array_key_exists($_POST['game_type_id'], $gameTypes)) {
$this->_utilMsg->showMsg(Tools::getLang('PLZ_SLT_GAME', 'Common'), -1, 2);
}
if (trim($_POST['title']) == '') {
$this->_utilMsg->showMsg('標題不能為空', -1, 2);
}
if (trim($_POST['href']) == '') {
$this->_utilMsg->showMsg('鏈接不能為空', -1, 2);
}
$this->_modelLyPsdLink->linkAdd();
$this->_utilMsg->showMsg(Tools::getLang('OPERATION_SUCCESS', 'Common'), 1, $this->_url['PsdLink'], 1);
}
$this->_view->assign('gameTypes', $gameTypes);
$this->_utilMsg->createPackageNavBar();
$this->_view->display();
}