本文整理汇总了PHP中tag::merge_tag方法的典型用法代码示例。如果您正苦于以下问题:PHP tag::merge_tag方法的具体用法?PHP tag::merge_tag怎么用?PHP tag::merge_tag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tag
的用法示例。
在下文中一共展示了tag::merge_tag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($operation == 'admin') {
$tagarray = array();
if (submitcheck('submit') && !empty($_GET['tagidarray']) && is_array($_GET['tagidarray']) && !empty($_GET['operate_type'])) {
$class_tag = new tag();
$tagidarray = array();
$operate_type = $newtag = $thread = '';
$tagidarray = $_GET['tagidarray'];
$operate_type = $_GET['operate_type'];
if ($operate_type == 'delete') {
$class_tag->delete_tag($tagidarray);
} elseif ($operate_type == 'open') {
C::t('common_tag')->update($tagidarray, array('status' => 0));
} elseif ($operate_type == 'close') {
C::t('common_tag')->update($tagidarray, array('status' => 1));
} elseif ($operate_type == 'merge') {
$data = $class_tag->merge_tag($tagidarray, $_GET['newtag']);
if ($data != 'succeed') {
cpmsg($data);
}
}
cpmsg('tag_admin_updated', 'action=tag&operation=admin&searchsubmit=yes&tagname=' . $_GET['tagname'] . '&perpage=' . $_GET['perpage'] . '&status=' . $_GET['status'] . '&page=' . $_GET['page'], 'succeed');
}
if (!submitcheck('searchsubmit', 1)) {
showformheader('tag&operation=admin');
showtableheader();
showsetting('tagname', 'tagname', $tagname, 'text');
showsetting('feed_search_perpage', '', $_GET['perpage'], "<select name='perpage'><option value='20'>{$lang['perpage_20']}</option><option value='50'>{$lang['perpage_50']}</option><option value='100'>{$lang['perpage_100']}</option></select>");
showsetting('misc_tag_status', array('status', array(array('', cplang('unlimited')), array(0, cplang('misc_tag_status_0')), array(1, cplang('misc_tag_status_1'))), TRUE), '', 'mradio');
showsubmit('searchsubmit');
showtablefooter();
showformfooter();
示例2: empty
}
cpheader();
shownav('user', 'usertag');
$lpp = empty($_GET['lpp']) ? 20 : $_GET['lpp'];
$start = ($page - 1) * $lpp;
if ($operation == '') {
if ($_GET['srchname']) {
$addurl = '&srchname=' . $_GET['srchname'];
}
if (submitcheck('submit') && $_GET['tagids']) {
$class_tag = new tag();
if ($_GET['operate_type'] == 'delete') {
$class_tag->delete_tag($_GET['tagids'], 'uid');
cpmsg('usertag_delete_succeed', 'action=usertag' . $addurl, 'succeed');
} elseif ($_GET['operate_type'] == 'merge' && $_GET['newtag']) {
$data = $class_tag->merge_tag($_GET['tagids'], $_GET['newtag'], 'uid');
if ($data != 'succeed') {
cpmsg($data);
}
cpmsg('usertag_merge_succeed', 'action=usertag' . $addurl, 'succeed');
}
}
showsubmenu('usertag', array(array('usertag_list', 'usertag', 1), array('usertag_add', 'usertag&operation=add', 0)));
showtableheader();
echo '<form method="post">' . $lang['keywords'] . ': <input type="text" name="srchname" value="' . $_GET['srchname'] . '" /> <input type="submit" name="usertag_search" value="' . $lang[search] . '" class="btn" /> </form>';
showtablefooter();
showformheader('usertag' . $addurl);
$tagcount = C::t('common_tag')->fetch_all_by_status(3, $_GET['srchname'], 0, 0, 1);
showtableheader(cplang('usertag_count', array('tagcount' => $tagcount)));
if ($tagcount) {
showsubtitle(array('', 'tagname', 'usernum', 'operation'));