當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GetIndexKey函數代碼示例

本文整理匯總了PHP中GetIndexKey函數的典型用法代碼示例。如果您正苦於以下問題:PHP GetIndexKey函數的具體用法?PHP GetIndexKey怎麽用?PHP GetIndexKey使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetIndexKey函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetFieldValueA

                     }
                     ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID);
                 }
             }
             $inadd_f .= ',' . $vs[0];
             $inadd_v .= " ,'" . ${$vs[0]} . "' ";
         }
     }
 }
 //處理圖片文檔的自定義屬性
 if ($litpic != '') {
     $flag = 'p';
 }
 $body = HtmlReplace($body, -1);
 //生成文檔ID
 $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $mid);
 if (empty($arcID)) {
     ShowMsg("無法獲得主鍵,因此無法進行後續操作!", "-1");
     exit;
 }
 //保存到主表
 $inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,\r\ncolor,writer,source,litpic,pubdate,senddate,mid,description,keywords)\r\nVALUES ('{$arcID}','{$typeid}','{$sortrank}','{$flag}','{$ismake}','{$channelid}','{$arcrank}','0','{$money}','{$title}','{$shorttitle}',\r\n'{$color}','{$writer}','{$source}','{$litpic}','{$pubdate}','{$senddate}','{$mid}','{$description}','{$keywords}'); ";
 if (!$dsql->ExecuteNoneQuery($inQuery)) {
     $gerr = $dsql->GetError();
     $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='{$arcID}' ");
     ShowMsg("把數據保存到數據庫主表 `#@__archives` 時出錯,請聯係管理員。", "javascript:;");
     exit;
 }
 //軟件鏈接列表
 $softurl1 = stripslashes($softurl1);
 $urls = '';
開發者ID:klr2003,項目名稱:sourceread,代碼行數:31,代碼來源:soft_add.php

示例2: cn_substr

$color =  cn_substr($color,10);
$writer =  cn_substr($writer,30);
$source = cn_substr($source,50);
$description = cn_substr($description,250);
if($keywords!="") $keywords = trim(cn_substr($keywords,60))." ";


//處理上傳的縮略圖
if(empty($ddisremote)) $ddisremote = 0;
$litpic = GetDDImage('litpic',$picname,$ddisremote);

$adminID = $cuserLogin->getUserID();

$dsql = new DedeSql(false);
$cts = GetChannelTable($dsql,$channelid);
$arcID = GetIndexKey($dsql,$typeid,$channelid);

//加入主檔案表

//----------------------------------
$inQuery = "INSERT INTO `{$cts['maintable']}`(
ID,typeid,typeid2,sortrank,iscommend,ismake,channel,
arcrank,click,title,shorttitle,color,writer,source,litpic,
pubdate,senddate,arcatt,adminID,memberID,description,keywords,templet) 
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$iscommend','$ismake','$channelid',
'$arcrank','0','$title','$shorttitle','$color','$writer','$source','$litpic',
'$pubdate','$senddate','$arcatt','$adminID','0','$description','$keywords','$templet');";

if(!$dsql->ExecuteNoneQuery($inQuery)){
	$gerr = $dsql->GetError();
	$dsql->Close();
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:spec_add_action.php

示例3: time

 }
 $senddate = time();
 $title = cn_substrR($title, $cfg_title_maxlen);
 $isremote = empty($isremote) ? 0 : $isremote;
 $serviterm = empty($serviterm) ? "" : $serviterm;
 if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) {
     $arcrank = -1;
 }
 $adminid = $cuserLogin->getUserID();
 $userip = GetIP();
 if (empty($ddisremote)) {
     $ddisremote = 0;
 }
 $litpic = GetDDImage('none', $picname, $ddisremote);
 //生成文檔ID
 $arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid);
 if (empty($arcID)) {
     ShowMsg("無法獲得主鍵,因此無法進行後續操作!", "-1");
     exit;
 }
 //分析處理附加表數據
 $inadd_f = '';
 $inadd_v = '';
 if (!empty($dede_addonfields)) {
     $addonfields = explode(';', $dede_addonfields);
     $inadd_f = '';
     $inadd_v = '';
     if (is_array($addonfields)) {
         foreach ($addonfields as $v) {
             if ($v == '') {
                 continue;
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:archives_sg_add.php


注:本文中的GetIndexKey函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。