当前位置: 首页>>代码示例>>PHP>>正文


PHP GetTopid函数代码示例

本文整理汇总了PHP中GetTopid函数的典型用法代码示例。如果您正苦于以下问题:PHP GetTopid函数的具体用法?PHP GetTopid怎么用?PHP GetTopid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetTopid函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: lib_mynews

function lib_mynews(&$ctag, &$refObj)
{
    global $dsql, $envs;
    //属性处理
    $attlist = "row|1,titlelen|24";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    if (empty($row)) {
        $row = 1;
    }
    if (empty($titlelen)) {
        $titlelen = 30;
    }
    if (empty($innertext)) {
        $innertext = GetSysTemplets('mynews.htm');
    }
    $idsql = '';
    if ($envs['typeid'] > 0) {
        $idsql = " where typeid='" . GetTopid($this->TypeID) . "' ";
    }
    $dsql->SetQuery("Select * from #@__mynews {$idsql} order by senddate desc limit 0,{$row}");
    $dsql->Execute();
    $ctp = new DedeTagParse();
    $ctp->SetNameSpace('field', '[', ']');
    $ctp->LoadSource($innertext);
    $revalue = '';
    while ($row = $dsql->GetArray()) {
        foreach ($ctp->CTags as $tagid => $ctag) {
            @$ctp->Assign($tagid, $row[$ctag->GetName()]);
        }
        $revalue .= $ctp->GetResult();
    }
    return $revalue;
}
开发者ID:klr2003,项目名称:sourceread,代码行数:35,代码来源:mynews.lib.php

示例2: ParseTempletsFirst

 /**
  *  解析模板,对固定的标记进行初始给值
  *
  * @access    public
  * @return    string
  */
 function ParseTempletsFirst()
 {
     if (isset($this->TypeLink->TypeInfos['reid'])) {
         $GLOBALS['envs']['reid'] = $this->TypeLink->TypeInfos['reid'];
     }
     $GLOBALS['envs']['typeid'] = $this->TypeID;
     $GLOBALS['envs']['topid'] = GetTopid($this->Fields['typeid']);
     $GLOBALS['envs']['cross'] = 1;
     MakeOneTag($this->dtp, $this);
 }
开发者ID:cwcw,项目名称:cms,代码行数:16,代码来源:arc.listview.class.php

示例3: ParseTempletsFirst

 /**
  *  解析模板,对固定的标记进行初始给值
  *
  * @access    public
  * @return    void
  */
 function ParseTempletsFirst()
 {
     if (empty($this->Fields['keywords'])) {
         $this->Fields['keywords'] = '';
     }
     if (empty($this->Fields['reid'])) {
         $this->Fields['reid'] = 0;
     }
     $GLOBALS['envs']['tags'] = $this->Fields['tags'];
     if (isset($this->TypeLink->TypeInfos['reid'])) {
         $GLOBALS['envs']['reid'] = $this->TypeLink->TypeInfos['reid'];
     }
     $GLOBALS['envs']['keyword'] = $this->Fields['keywords'];
     $GLOBALS['envs']['typeid'] = $this->Fields['typeid'];
     $GLOBALS['envs']['topid'] = GetTopid($this->Fields['typeid']);
     $GLOBALS['envs']['aid'] = $GLOBALS['envs']['id'] = $this->Fields['id'];
     $GLOBALS['envs']['adminid'] = $GLOBALS['envs']['mid'] = isset($this->Fields['mid']) ? $this->Fields['mid'] : 1;
     $GLOBALS['envs']['channelid'] = $this->TypeLink->TypeInfos['channeltype'];
     if ($this->Fields['reid'] > 0) {
         $GLOBALS['envs']['typeid'] = $this->Fields['reid'];
     }
     MakeOneTag($this->dtp, $this, 'N');
 }
开发者ID:nomagame,项目名称:HNJC-Official-Website,代码行数:29,代码来源:arc.archives.class.php

示例4: ParseTemplet

 /**
  *  解析模板里的标签
  *
  * @access    private
  * @return    void
  */
 function ParseTemplet()
 {
     $GLOBALS['envs']['typeid'] = $this->TypeID;
     if ($this->TypeID > 0) {
         $GLOBALS['envs']['topid'] = GetTopid($this->TypeID);
     } else {
         $GLOBALS['envs']['topid'] = 0;
     }
     if (isset($this->TypeLink->TypeInfos['reid'])) {
         $GLOBALS['envs']['reid'] = $this->TypeLink->TypeInfos['reid'];
     }
     if (isset($this->TypeLink->TypeInfos['channeltype'])) {
         $GLOBALS['envs']['channelid'] = $this->TypeLink->TypeInfos['channeltype'];
     }
     MakeOneTag($this->dtp, $this);
     //这个函数放在 channelunit.func.php 文件中
 }
开发者ID:iabing,项目名称:mzzyc,代码行数:23,代码来源:arc.partview.class.php

示例5: empty

        }
    }
}
$myrow['content'] = empty($myrow['content']) ? " " : $myrow['content'];
//读取频道模型信息
$channelid = $myrow['channeltype'];
$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
    $channelArray[$row->id]['typename'] = $row->typename;
    $channelArray[$row->id]['nid'] = $row->nid;
    if ($row->id == $channelid) {
        $nid = $row->nid;
    }
}
PutCookie('lastCid', GetTopid($id), 3600 * 24, "/");
if ($dopost == 'time') {
    ?>
      <form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();">
  <input type="hidden" name="dopost" value="savetime" />
  <input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
  <input type="hidden" name="topid" value="<?php 
    echo $myrow['topid'];
    ?>
" />
  <input type="hidden" name="moresite" value="<?php 
    echo $myrow['moresite'];
    ?>
开发者ID:nothingsoga1,项目名称:shfayidiyj,代码行数:31,代码来源:catalog_edit.php

示例6: GetTopid

 function GetTopid($tid)
 {
     global $cfg_Cs;
     if (!is_array($cfg_Cs)) {
         require_once DEDEDATA . "/cache/inc_catalog_base.inc";
     }
     if (!isset($cfg_Cs[$tid][0]) || $cfg_Cs[$tid][0] == 0) {
         return $tid;
     } else {
         return GetTopid($cfg_Cs[$tid][0]);
     }
 }
开发者ID:hensonvip,项目名称:ymroad,代码行数:12,代码来源:channelunit.helper.php

示例7: values

                    $zuozheurl = $typedir . ".html";
                    $keyword_in_query = "insert into `#@__keywords` (`keyword`, `rank`, `sta`, `rpurl`) values('{$typename}','30','1','{$zuozheurl}')";
                    $dsql->ExecuteNoneQuery($keyword_in_query);
                }
            }
            //将小说插入文档关键词中
            if ($reid != '45' && ($co_autokeytype == 2 || ($co_autokeytype = 3))) {
                $row = $dsql->GetOne("SELECT `keyword` FROM `#@__keywords` WHERE `keyword`='{$typename}'");
                if (!$row && strlen($typename) > 2) {
                    $typeurl = $typedir . "/";
                    $dsql->ExecuteNoneQuery("insert into `#@__keywords` (`keyword`, `rank`, `sta`, `rpurl`) values('{$typename}','30','1','{$typeurl}')");
                }
            }
            UpDateCatCache();
            if ($reid > 0) {
                PutCookie('lastCid', GetTopid($reid), 3600 * 24, '/');
            }
            ShowMsg("成功创建一个分类!", "catalog_main.php");
            exit;
        }
    }
}
//End dopost==save
//获取从父目录继承的默认参数
if ($dopost == '') {
    $channelid = 1;
    $issend = 1;
    $corank = 0;
    $reid = 0;
    $topid = 0;
    $typedir = '';
开发者ID:soonfine,项目名称:leread,代码行数:31,代码来源:catalog_add.php


注:本文中的GetTopid函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。