本文整理汇总了PHP中GetTags函数的典型用法代码示例。如果您正苦于以下问题:PHP GetTags函数的具体用法?PHP GetTags怎么用?PHP GetTags使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetTags函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UpIndexKey
function UpIndexKey($id, $arcrank, $typeid, $sortrank = 0, $tags = '')
{
global $dsql, $typeid2;
if (empty($typeid2)) {
$typeid2 = 0;
}
$addtime = time();
$query = " Update `#@__arctiny` set `arcrank`='{$arcrank}', `typeid`='{$typeid}',`sortrank`='{$sortrank}' where id = '{$id}' ";
$dsql->ExecuteNoneQuery($query);
$query = " Update `#@__arctiny` set `typeid2`='{$typeid2}' where id = '{$id}' ";
$dsql->ExecuteNoneQuery($query);
/*
* 处理修改后的Tag
*/
if ($tags != '') {
$oldtag = GetTags($id);
$oldtags = explode(',', $oldtag);
$tagss = explode(',', $tags);
foreach ($tagss as $tag) {
$tag = trim($tag);
if (isset($tag[12]) || $tag != stripslashes($tag)) {
continue;
}
if (!in_array($tag, $oldtags)) {
InsertOneTag($tag, $id);
}
}
foreach ($oldtags as $tag) {
if (!in_array($tag, $tagss)) {
$dsql->ExecuteNoneQuery("Delete From `#@__taglist` where aid='{$id}' And tag like '{$tag}' ");
$dsql->ExecuteNoneQuery("Update `#@__tagindex` set total=total-1 where tag like '{$tag}' ");
} else {
$dsql->ExecuteNoneQuery("Update `#@__taglist` set `arcrank` = '{$arcrank}', `typeid` = '{$typeid}' where tag like '{$tag}' ");
}
}
}
}
示例2: ShowMsg
exit;
}
$query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'";
$cInfos = $dsql->GetOne($query);
if (!is_array($cInfos)) {
ShowMsg("读取频道配置信息出错!", "javascript:;");
exit;
}
$addtable = $cInfos['addtable'];
$addRow = $dsql->GetOne("SELECT * FROM `{$addtable}` WHERE aid='{$aid}'");
if (!is_array($addRow)) {
ShowMsg("读取附加信息出错!", "javascript:;");
exit;
}
$channelid = $arcRow['channel'];
$tags = GetTags($aid);
include DedeInclude("templets/article_edit.htm");
exit;
} else {
if ($dopost == 'save') {
require_once DEDEINC . '/image.func.php';
require_once DEDEINC . '/oxwindow.class.php';
$flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($typeid2)) {
$typeid2 = 0;
}
if (!isset($autokey)) {
$autokey = 0;
}
if (!isset($remote)) {
示例3: UpIndexKey
function UpIndexKey($id, $arcrank, $typeid, $sortrank = 0, $tags = '')
{
global $dsql, $typeid2;
if (empty($typeid2)) {
$typeid2 = 0;
}
$addtime = time();
$query = " UPDATE `#@__arctiny` SET `arcrank`='{$arcrank}', `typeid`='{$typeid}', `typeid2`='{$typeid2}', `sortrank`='{$sortrank}' WHERE id = '{$id}' ";
$dsql->ExecuteNoneQuery($query);
/*
* 处理修改后的Tag
*/
if ($tags != '') {
$oldtag = GetTags($id);
$oldtags = explode(',', $oldtag);
$tagss = explode(',', $tags);
foreach ($tagss as $tag) {
$tag = trim($tag);
if (isset($tag[12]) || $tag != stripslashes($tag)) {
continue;
}
if (!in_array($tag, $oldtags)) {
InsertOneTag($tag, $id);
}
}
foreach ($oldtags as $tag) {
if (!in_array($tag, $tagss)) {
$dsql->ExecuteNoneQuery("DELETE FROM `#@__taglist` WHERE aid='{$id}' AND tag LIKE '{$tag}' ");
$dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET total=total-1 WHERE tag LIKE '{$tag}' ");
} else {
$dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET `arcrank` = '{$arcrank}', `typeid` = '{$typeid}' WHERE tag LIKE '{$tag}' ");
}
}
}
}
示例4: __construct
/**
* php5构造函数
*
* @access public
* @param int $aid 文档ID
* @return string
*/
function __construct($aid)
{
global $dsql, $ftp;
$this->IsError = FALSE;
$this->ArcID = $aid;
$this->PreNext = array();
$this->dsql = $dsql;
$query = "SELECT channel,typeid FROM `#@__arctiny` WHERE id='{$aid}' ";
$arr = $this->dsql->GetOne($query);
if (!is_array($arr)) {
$this->IsError = TRUE;
} else {
if ($arr['channel'] == 0) {
$arr['channel'] = 1;
}
$this->ChannelUnit = new ChannelUnit($arr['channel'], $aid);
$this->TypeLink = new TypeLink($arr['typeid']);
if ($this->ChannelUnit->ChannelInfos['issystem'] != -1) {
// 如果当前文档不是系统模型,为单表模型
$query = "SELECT arc.*,tp.reid,tp.typedir,ch.addtable\n FROM `#@__archives` arc\n LEFT JOIN #@__arctype tp on tp.id=arc.typeid\n LEFT JOIN #@__channeltype as ch on arc.channel = ch.id\n WHERE arc.id='{$aid}' ";
$this->Fields = $this->dsql->GetOne($query);
} else {
$this->Fields['title'] = '';
$this->Fields['money'] = $this->Fields['arcrank'] = 0;
$this->Fields['senddate'] = $this->Fields['pubdate'] = $this->Fields['mid'] = $this->Fields['adminid'] = 0;
$this->Fields['ismake'] = 1;
$this->Fields['filename'] = '';
}
if ($this->TypeLink->TypeInfos['corank'] > 0 && $this->Fields['arcrank'] == 0) {
$this->Fields['arcrank'] = $this->TypeLink->TypeInfos['corank'];
}
$this->Fields['tags'] = GetTags($aid);
$this->dtp = new DedeTagParse();
$this->dtp->SetRefObj($this);
$this->SplitPageField = $this->ChannelUnit->SplitPageField;
$this->SplitFields = '';
$this->TotalPage = 1;
$this->NameFirst = '';
$this->ShortName = 'html';
$this->FixedValues = '';
$this->TempSource = '';
$this->ftp =& $ftp;
$this->remoteDir = '';
if (empty($GLOBALS['pageno'])) {
$this->NowPage = 1;
} else {
$this->NowPage = $GLOBALS['pageno'];
}
//特殊的字段数据处理
$this->Fields['aid'] = $aid;
$this->Fields['id'] = $aid;
$this->Fields['position'] = $this->TypeLink->GetPositionLink(TRUE);
$this->Fields['typeid'] = $arr['typeid'];
//设置一些全局参数的值
foreach ($GLOBALS['PubFields'] as $k => $v) {
$this->Fields[$k] = $v;
}
//为了减少重复查询,这里直接把附加表查询记录放在 $this->addTableRow 中,在 ParAddTable() 不再查询
if ($this->ChannelUnit->ChannelInfos['addtable'] != '') {
$query = "SELECT * FROM `{$this->ChannelUnit->ChannelInfos['addtable']}` WHERE `aid` = '{$aid}'";
$this->addTableRow = $this->dsql->GetOne($query);
}
//issystem==-1 表示单表模型,单表模型不支持redirecturl这类参数,因此限定内容普通模型才进行下面查询
if ($this->ChannelUnit->ChannelInfos['addtable'] != '' && $this->ChannelUnit->ChannelInfos['issystem'] != -1) {
if (is_array($this->addTableRow)) {
$this->Fields['redirecturl'] = $this->addTableRow['redirecturl'];
$this->Fields['templet'] = $this->addTableRow['templet'];
$this->Fields['userip'] = $this->addTableRow['userip'];
}
$this->Fields['templet'] = empty($this->Fields['templet']) ? '' : trim($this->Fields['templet']);
$this->Fields['redirecturl'] = empty($this->Fields['redirecturl']) ? '' : trim($this->Fields['redirecturl']);
$this->Fields['userip'] = empty($this->Fields['userip']) ? '' : trim($this->Fields['userip']);
} else {
$this->Fields['templet'] = $this->Fields['redirecturl'] = '';
}
}
//!error
}
示例5: AdminMenu
td span {
white-space: nowrap;
}
//--></STYLE>
</HEAD>
<BODY BGCOLOR="silver">
<DIV ALIGN=center>
<?php
echo AdminMenu();
echo FramedTable1();
$result = db_query("SELECT * FROM {categories} WHERE id = {$page_id}");
if (db_num_rows($result)) {
$item = db_fetch_array($result);
$frm['#tags'] = GetTags();
echo '<form method="post"><table border="0">';
echo '<tr><td width="50"></td><td><b>' . $item['name'] . '</b>:</td><td>';
echo FormInput('search', 25) . ' <input type="submit" value=" Search ">';
echo '</td><td width="50"></td></tr>';
echo '<tr><td width="50"></td><td>Tags: ' . FormSelect('cond', array('and' => 'and', 'or' => 'or')) . '</td><td>';
echo FormCheckarea('tags');
echo '</td><td width="50"></td></tr>';
echo '</table></form>';
$cond = array("C.lnum BETWEEN {$item['lnum']} AND {$item['rnum']}", "P.id = C.id_parent", "C.uniqid = G.uid_cat");
if (!empty($frm['search'])) {
$cond[] = "(upper(G.name) LIKE upper('%{$frm['search']}%') OR upper(G.description) LIKE upper('%{$frm['search']}%'))";
}
if (isset($frm['tags']) && count($frm['tags'])) {
if ($frm['cond'] == 'or') {
$cond[] = "G.id IN (SELECT id_col FROM {tag_collections} T WHERE id_tag IN (" . join(',', $frm['tags']) . "))";
示例6: DisplayCollectionForm
function DisplayCollectionForm()
{
global $page_id, $frm;
// Wartości domyślne
if (!isset($frm)) {
$frm = array('sercol' => 5, 'serrow' => 4, 'datecr' => date('Y-m-d'));
}
if ($page_id) {
GetCollectionData($page_id);
}
$hier_cat = GetCategoriesHierarchy($frm[parent], $page_id, 1);
// Odczytanie tagów
$frm['#tags'] = GetTags();
SetCollectionTags($page_id, 'tags');
echo FramedTable1() . '<FORM METHOD="POST">' . '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>' . '<TR><TH> Collection </TH><TD></TD></TR>' . '<TR><TD></TD><TD ALIGN=right> ' . FormSelect('action', array('mod' => 'Modify', 'del' => 'Delete')) . ' <INPUT TYPE="submit" VALUE=" Send "> ' . '</TD></TR>' . '<TR><TD> Category: </TD><TD> ' . '<SELECT NAME="frm[parent]">' . $hier_cat . '</SELECT>' . ' Position ' . FormInput('position', 4, 1) . ' </TD></TR>' . '<TR><TD> Uniqid & Date: </TD><TD> ' . FormInput('uniqid') . ' ' . FormInput('datecr', 12) . ' </TD></TR>' . '<TR><TD> Name: </TD><TD> ' . FormInput('name') . ' </TD></TR>' . '<TR><TD> Title: </TD><TD> ' . FormInput('title') . ' </TD></TR>' . '<TR><TD> Header: </TD><TD> ' . FormInput('header') . ' </TD></TR>' . '<TR><TD> Description: </TD><TD> ' . FormText('desc', 80, 5) . '<BR>' . FormCheckbox('addbr') . ' Auto add "break line" </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Tags: </TD><TD> ' . FormCheckarea('tags') . ' </TD></TR>' . '<TR><TD> New tags: </TD><TD> ' . FormText('newtags', 80, 2) . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Series: </TD><TD> ' . FormSelect('sercol', range(1, 10), 0) . ' x ' . FormSelect('serrow', range(1, 10), 0) . ' (columns x rows) ' . '</TD></TR>' . '<TR><TD> Images: </TD><TD> First number ' . FormInput('first', 4, 1) . ' Quantity ' . FormInput('quantity', 4, 1) . ' </TD></TR>' . '<TR><TD> Number holes: </TD><TD> ' . FormText('holes', 60, 2) . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Collection directory: </TD><TD> ' . FormInput('dirgr') . ' </TD></TR>' . '<TR><TD> Image directory: </TD><TD> ' . FormInput('dirimg') . ' </TD></TR>' . '<TR><TD> Thumbnails directory: </TD><TD> ' . FormInput('dirth') . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Pages template: </TD><TD> ' . FormInput('temppage', 50, '%02d') . ' </TD></TR>' . '<TR><TD> Images template: </TD><TD> ' . FormInput('tempimg') . ' </TD></TR>' . '<TR><TD> Thumbnails template: </TD><TD> ' . FormInput('tempth') . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Options: </TD><TD> Links to ' . FormSelect('options', array('' => 'None', 'LP' => 'Page', 'LI' => 'Image')) . ' ' . FormCheckbox('intro') . ' Exist intro page ' . '</TD></TR>' . '<TR><TD> Image on intro page: </TD><TD> ' . FormInput('introimg') . ' </TD></TR>' . '<TR><TD> Thumbnail for group: </TD><TD> ' . FormInput('thumbimg') . ' </TD></TR>' . '</TABLE>' . '</FORM>' . FramedTable2();
if ($page_id) {
DisplayThumbForm($page_id);
}
}