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


PHP DedeSql::GetObject方法代码示例

本文整理汇总了PHP中DedeSql::GetObject方法的典型用法代码示例。如果您正苦于以下问题:PHP DedeSql::GetObject方法的具体用法?PHP DedeSql::GetObject怎么用?PHP DedeSql::GetObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DedeSql的用法示例。


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

示例1: GetOptionList

function GetOptionList($selid=0,$userCatalog=0,$channeltype=0)
{
    global $OptionArrayList,$channels,$dsql;
    
    if(!is_object($dsql)) $dsql = new DedeSql(false);
    
    $dsql->SetQuery("Select ID,typename From #@__channeltype ");
    $dsql->Execute();
    $channels = Array();
    while($row = $dsql->GetObject()) $channels[$row->ID] = $row->typename;
    
    $OptionArrayList = "";
    
    $query = "Select ID,typename,ispart,channeltype,issend From #@__arctype where ispart<>2 And reID=0 order by sortrank asc ";
      
    $dsql->SetQuery($query);
    $dsql->Execute();
    	
    while($row=$dsql->GetObject())
    {
        if($row->channeltype==$channeltype && $row->issend==1){
        	 if($row->ispart==0) $OptionArrayList .= "<option value='".$row->ID."' class='option3'>".$row->typename."</option>\r\n";
           else if($row->ispart==1) $OptionArrayList .= "<option value='".$row->ID."' class='option2'>".$row->typename."</option>\r\n";
        }
        LogicGetOptionArray($row->ID,"─",$channeltype,$dsql);
    }
     
    return $OptionArrayList; 
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:29,代码来源:inc_catalog_options.php

示例2: GetRankName

function GetRankName($arcrank)
{
	global $arcArray,$dsql;
	if(!is_array($arcArray)){
		$dsql = new DedeSql(false);
		$dsql->SetQuery("Select * from #@__arcrank");
		$dsql->Execute('rn1');
		while($row = $dsql->GetObject('rn1')){ $arcArray[$row->rank]=$row->membername; }
	}
	if(isset($arcArray[$arcrank])) return $arcArray[$arcrank];
	else return "不限";
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:12,代码来源:inc_list_functions.php

示例3: __index

require_once dirname(__FILE__) . "/include/common.inc.php";
header("Content-Type: text/html; charset=utf-8");
//header("Content-type:text/vnd.wap.wml");
require_once dirname(__FILE__) . "/include/wap.inc.php";
if (empty($action)) {
    $action = 'index';
}
$dsql = new DedeSql(false);
$cfg_templets_dir = $cfg_basedir . $cfg_templets_dir;
$channellist = '';
$newartlist = '';
$channellistnext = '';
//顶级导航列表
$dsql->SetQuery("Select id,typename From `#@__arctype` where reid=0 And channeltype=1 And ishidden=0 And ispart<>2 order by sortrank");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
    $channellist .= "<a href='wap.php?action=list&amp;id={$row->id}'>{$row->typename}</a> ";
}
//当前时间
$curtime = strftime("%Y-%m-%d %H:%M:%S", time());
$cfg_webname = ConvertStr($cfg_webname);
//主页
/*------------
function __index();
------------*/
if ($action == 'index') {
    //最新文章
    $dsql->SetQuery("Select id,title,pubdate From `#@__archives` where channel=1 And arcrank = 0 order by id desc limit 0,10");
    $dsql->Execute();
    while ($row = $dsql->GetObject()) {
        $newartlist .= "<a href='wap.php?action=article&amp;id={$row->id}'>" . ConvertStr($row->title) . "</a> [" . date("m-d", $row->pubdate) . "]<br />";
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:wap.php

示例4: checkUser

	function checkUser($username,$userpwd)
	{
		//只允许用户名和密码用0-9,a-z,A-Z,'@','_','.','-'这些字符
		$this->userName = ereg_replace("[^0-9a-zA-Z_@\!\.-]",'',$username);
		$this->userPwd = ereg_replace("[^0-9a-zA-Z_@\!\.-]",'',$userpwd);
		$pwd = substr(md5($this->userPwd),0,24);
		$dsql = new DedeSql(false);
		$dsql->SetQuery("Select * From #@__admin where userid='".$this->userName."' limit 0,1");
		$dsql->Execute();
		$row = $dsql->GetObject();
		if(!isset($row->pwd)){
			$dsql->Close();
			return -1;
		}
		else if($pwd!=$row->pwd){
			$dsql->Close();
			return -2;
		}
		else{
			$loginip = GetIP();
			$this->userID = $row->ID;
			$this->userType = $row->usertype;
			$this->userChannel = $row->typeid;
			$this->userName = $row->uname;
			$groupSet = $dsql->GetOne("Select * From #@__admintype where rank='".$row->usertype."'");
			$this->userPurview = $groupSet['purviews'];
			$dsql->SetQuery("update #@__admin set loginip='$loginip',logintime='".strftime("%Y-%m-%d %H:%M:%S",time())."' where ID='".$row->ID."'");
			$dsql->ExecuteNoneQuery();
			$dsql->Close();
			return 1;
		}
	}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:32,代码来源:inc_userlogin.php

示例5: trim

if($dopost=="edit")
{
   $msg = cn_substr($msg,1500);
   $adminmsg = trim($adminmsg);
   if($adminmsg!="")
   {
	  $adminmsg = cn_substr($adminmsg,1500);
	  $adminmsg = str_replace("<","&lt;",$adminmsg);
	  $adminmsg = str_replace(">","&gt;",$adminmsg);
	  $adminmsg = str_replace("  ","&nbsp;&nbsp;",$adminmsg);
	  $adminmsg = str_replace("\r\n","<br/>\n",$adminmsg);
	  $msg = $msg."<br/>\n"."<font color=red>管理员回复: $adminmsg</font>\n";
   }
   $query = "update #@__feedback set username='$username',msg='$msg',ischeck=1 where ID=$ID";
   $dsql->SetQuery($query);
   $dsql->ExecuteNoneQuery();
   $dsql->Close();
   ShowMsg("成功回复一则留言!",$ENV_GOBACK_URL);
   exit();
}

$query = "select * from #@__feedback where ID=$ID";
$dsql->SetQuery($query);
$dsql->Execute();
$row = $dsql->GetObject();

require_once(dirname(__FILE__)."/templets/feedback_edit.htm");

ClearAllLink();
?>
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:30,代码来源:feedback_edit.php

示例6: time

if($cip!="") $where .= " And #@__log.cip like '%$cip%' ";
if($dtime>0){
	$nowtime = time();
	$starttime = $nowtime - ($dtime*24*3600);
	$where .= " And #@__log.dtime>'$starttime' ";
}

$sql = "Select #@__log.*,#@__admin.userid From #@__log
     left join #@__admin on #@__admin.ID=#@__log.adminid 
     where 1=1 $where order by #@__log.lid desc";
 
$adminlist = "";
$dsql = new DedeSql(false);
$dsql->SetQuery("Select ID,uname From #@__admin");
$dsql->Execute('admin');
while($myrow = $dsql->GetObject('admin')){
	$adminlist .="<option value='{$myrow->ID}'>{$myrow->uname}</option>\r\n";
}
$dsql->Close();    

$dlist = new DataList();
$dlist->Init();
$dlist->pageSize = 20;
$dlist->SetParameter("adminid",$adminid);
$dlist->SetParameter("cip",$cip);
$dlist->SetParameter("dtime",$dtime);
$dlist->SetSource($sql);
include(dirname(__FILE__)."/templets/log_list.htm");
$dlist->Close();

ClearAllLink();
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:log_list.php

示例7: GetOptionList

function GetOptionList($selid=0,$userCatalog=0,$channeltype=0)
{
    global $OptionArrayList,$channels,$adminCats,$adminCatstrs,$suserCatalog;
    $suserCatalog = $userCatalog;
    $dsql = new DedeSql(false);
    //读取频道模型信息
    $dsql->SetQuery("Select ID,typename From #@__channeltype ");
    $dsql->Execute();
    $channels = Array();
    while($row = $dsql->GetObject()) $channels[$row->ID] = $row->typename;
    
    $OptionArrayList = "";
    
    $adminCats = array();
    if(!empty($userCatalog) && $userCatalog!='-1')
    {
    	 $adminCats = explode(',',$userCatalog);
    	 $adminCatstrs = $userCatalog;
    }

    if($selid==0)
    {	
        $query = "Select ID,typename,ispart,channeltype From #@__arctype where ispart<2 And reID=0 order by sortrank asc ";
        $dsql->SetQuery($query);
        $dsql->Execute();
       while($row=$dsql->GetObject())
       {
          if(TestHasChannel($row->ID,$channeltype)==0) continue;
          if( TestAdmin() || $userCatalog==-1 )
          {
          	  if($row->ispart==1) $OptionArrayList .= "<option value='".$row->ID."' class='option1'>".$row->typename."(封面频道)</option>\r\n";
              else if($row->ispart==2) $OptionArrayList .= "";
              else if($row->channeltype!=$channeltype) $OptionArrayList .= "<option value='".$row->ID."' class='option2'>".$row->typename."(".$channels[$row->channeltype].")</option>\r\n";
              else $OptionArrayList .= "<option value='".$row->ID."' class='option3'>".$row->typename."</option>\r\n";
          	  LogicGetOptionArray($row->ID,"─",$channeltype,$dsql);
          }else
          {
             if(in_array($row->ID,$adminCats))
             {
             	  if($row->ispart==1) $OptionArrayList .= "<option value='".$row->ID."' class='option1'>".$row->typename."(封面频道)</option>\r\n";
                else if($row->ispart==2) $OptionArrayList .= "";
                else if($row->channeltype!=$channeltype) $OptionArrayList .= "<option value='".$row->ID."' class='option2'>".$row->typename."(".$channels[$row->channeltype].")</option>\r\n";
                else $OptionArrayList .= "<option value='".$row->ID."' class='option3'>".$row->typename."</option>\r\n";
                LogicGetOptionArray($row->ID,"─",$channeltype,$dsql,false);
             }else
             {
             	 $haspurcat = false;
             	 $query = "Select ID From #@__arctype where ispart<2 And reID={$row->ID} order by sortrank asc ";
               $dsql->Execute('sel'.$row->ID,$query);
               while($nrow = $dsql->GetObject('sel'.$row->ID)){
          	      if(in_array($nrow->ID,$adminCats)){ $haspurcat=true; break; }
               }
               if($haspurcat){
             	    $OptionArrayList .= "<option value='".$row->ID."' class='option1'>".$row->typename."(没权限)</option>\r\n";
             	    LogicGetOptionArray($row->ID,"─",$channeltype,$dsql);
             	 }
             }
          }
       }
    }else
    {
    	   $row = $dsql->GetOne("Select ID,typename,ispart,channeltype From #@__arctype where ID='$selid'");
    	   $channeltype = $row['channeltype'];
    	   if($row['ispart']==1) $OptionArrayList .= "<option value='$selid' class='option1' selected>".$row['typename']."(封面频道)</option>\r\n";
         else $OptionArrayList .= "<option value='$selid' class='option3' selected>".$row['typename']."</option>\r\n";
         LogicGetOptionArray($selid,"─",$channeltype,$dsql,false);
    }
    return $OptionArrayList; 
	}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:69,代码来源:inc_catalog_options.php


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