function SumYear($uid){
	global $dsql,$ntime;
	$y = strftime("%Y",$ntime);
	$stime = GetMkTime("{$y}-01-01");
	$row = $dsql->GetOne("Select sum(click) as dd From #@__archives where adminid='$uid' And senddate>=$stime; ");
	return $row['dd'];
}
示例#2
0
 /**
  *  php5构造函数
  *
  * @access    public
  * @param     int  $starttime  开始时间
  * @return    string
  */
 function __construct($starttime = 0)
 {
     global $ftp;
     $this->TypeID = 0;
     $this->dsql = $GLOBALS['dsql'];
     $this->dtp = new DedeTagParse();
     $this->dtp->SetRefObj($this);
     $this->dtp->SetNameSpace("dede", "{", "}");
     $this->dtp2 = new DedeTagParse();
     $this->dtp2->SetNameSpace("field", "[", "]");
     $this->TypeLink = new TypeLink(0);
     $this->ChannelUnit = new ChannelUnit(-1);
     $this->ftp =& $ftp;
     $this->remoteDir = '';
     //设置一些全局参数的值
     foreach ($GLOBALS['PubFields'] as $k => $v) {
         $this->Fields[$k] = $v;
     }
     if ($starttime == 0) {
         $this->StartTime = 0;
     } else {
         $this->StartTime = GetMkTime($starttime);
     }
     $this->CountRecord();
     $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $GLOBALS['cfg_df_style'] . "/list_spec.htm";
     if (!file_exists($tempfile) || !is_file($tempfile)) {
         echo "模板文件不存在,无法解析文档!";
         exit;
     }
     $this->dtp->LoadTemplate($tempfile);
     $this->TempInfos['tags'] = $this->dtp->CTags;
     $this->TempInfos['source'] = $this->dtp->SourceString;
     $ctag = $this->dtp->GetTag("page");
     if (!is_object($ctag)) {
         $this->PageSize = 20;
     } else {
         if ($ctag->GetAtt("pagesize") != "") {
             $this->PageSize = $ctag->GetAtt("pagesize");
         } else {
             $this->PageSize = 20;
         }
     }
     $this->TotalPage = ceil($this->TotalResult / $this->PageSize);
 }
	function __construct($typeid,$starttime=0,$areaid=0,$areaid2=0,$sectorid=0,$sectorid2=0,$smalltypeid=0)
 	{
 		$this->areaid = $areaid;
 		$this->areaid2 = $areaid2;
 		$this->sectorid = $sectorid;
 		$this->sectorid2 = $sectorid2;
 		$this->smalltypeid = $smalltypeid;
 		$this->TypeID = $typeid;
 		$this->dsql = new DedeSql(false);
 		$this->dtp = new DedeTagParse();
 		$this->dtp->SetNameSpace("dede","{","}");
 		$this->dtp2 = new DedeTagParse();
 		$this->dtp2->SetNameSpace("field","[","]");
 		$this->TypeLink = new TypeLink($typeid);
 		$this->ChannelUnit = new ChannelUnit($this->TypeLink->TypeInfos['channeltype']);

 		$this->maintable = $this->ChannelUnit->ChannelInfos['maintable'];
 		$this->topareas = $this->subareas = $this->areas = $this->sectors = $this->smalltypes = array();
 		$this->areas[0] = $this->sectors[0] = $this->smalltypes[0] = '不限';
		$this->topareas[0] = array("id"=>0 , "name"=>'不限');
 		$this->addtable = $this->ChannelUnit->ChannelInfos['addtable'];
 		$this->Fields = $this->TypeLink->TypeInfos;
 		
 		$this->hasDmCache = false;
 		
 		$this->Fields['id'] = $typeid;
 		$this->Fields['position'] = $this->TypeLink->GetPositionLink(true);
 		$this->Fields['title'] = ereg_replace("[<>]"," / ",$this->TypeLink->GetPositionLink(false));
 		
 		//设置一些全局参数的值
 		foreach($GLOBALS['PubFields'] as $k=>$v) $this->Fields[$k] = $v;
 		$this->Fields['rsslink'] = $GLOBALS['cfg_mainsite'].$GLOBALS['cfg_plus_dir']."/rss/".$this->TypeID.".xml";
 		
 		if($starttime==0) $this->StartTime = 0;
 		else $this->StartTime = GetMkTime($starttime);

    if($this->TypeLink->TypeInfos['ispart']<=2)
    {
 		    $this->PartView = new PartView($typeid);
 		    $this->CountRecord();
 		}
  }
示例#4
0
         }
     }
     ShowMsg("完成更新所有文档,现在开始更新栏目页!", "makehtml_all.php?action=make&step=4&uptype={$uptype}&mkvalue={$mkvalue}");
     exit;
 } else {
     if ($step == 4) {
         $mkvalue = intval($mkvalue);
         $typeidsok = $typeids = array();
         $adminID = $cuserLogin->getUserID();
         $mkcachefile = DEDEDATA . "/mkall_cache_{$adminID}.php";
         if ($uptype == 'all' || empty($mkvalue)) {
             ShowMsg("不需要进行初处理,现更新所有栏目!", "makehtml_list_action.php?gotype=mkallct");
             exit;
         } else {
             if ($uptype == 'time') {
                 $query = "SELECT  DISTINCT typeid From `#@__arctiny` WHERE senddate >=" . GetMkTime($mkvalue) . " AND arcrank>-1";
             } else {
                 $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE id>={$mkvalue} AND arcrank>-1";
             }
             $dsql->SetQuery($query);
             $dsql->Execute();
             while ($row = $dsql->GetArray()) {
                 $typeids[$row['typeid']] = 1;
             }
             foreach ($typeids as $k => $v) {
                 $vs = array();
                 $vs = GetParentIds($k);
                 if (!isset($typeidsok[$k])) {
                     $typeidsok[$k] = 1;
                 }
                 foreach ($vs as $k => $v) {
示例#5
0
				</li>
			</ul></td>
	</tr>
	<?php 
$sql = "SELECT * FROM `#@__sysevent` WHERE `id`<>0";
if (!empty($uname)) {
    $sql .= " AND `uname`='{$uname}'";
}
if (!empty($siteid)) {
    $sql .= " AND `siteid`={$siteid}";
}
if (!empty($starttime)) {
    $sql .= " AND `posttime`>=" . GetMkTime($starttime);
}
if (!empty($endtime)) {
    $sql .= " AND `posttime`<=" . GetMkTime($endtime);
}
$dopage->GetPage($sql, 30);
while ($row = $dosql->GetArray()) {
    $r = $dosql->GetOne("SELECT `sitename` FROM `#@__site` WHERE `id`=" . $row['siteid']);
    if (empty($r)) {
        $r['sitename'] = '未知站点';
    }
    if ($row['model'] == 'login') {
        ?>
	<tr class="dataTr">
		<td height="36"><span class="padl10"> <span class="number"><?php 
        echo GetDateTime($row['posttime']);
        ?>
</span>:</span>用户 <strong><?php 
        echo $row['uname'];
示例#6
0
 //获取时间和标题
 $pubdate = $sortrank = time();
 $title = $row->title;
 $litpic = '';
 foreach ($dtp->CTags as $ctag) {
     $itemName = $ctag->GetAtt('name');
     if ($itemName == 'title' && $usetitle == 0) {
         $title = trim($ctag->GetInnerText());
         if ($title == '') {
             $title = $row->title;
         }
     } else {
         if ($itemName == 'pubdate') {
             $pubdate = trim($ctag->GetInnerText());
             if (preg_match("#[^0-9]#", $pubdate)) {
                 $pubdate = $sortrank = GetMkTime($pubdate);
             } else {
                 $pubdate = $sortrank = time();
             }
         } else {
             if ($itemName == 'litpic') {
                 $litpic = trim($ctag->GetInnerText());
             }
         }
     }
 }
 //检测重复标题
 $title = addslashes($title);
 if ($onlytitle) {
     $testrow = $dsql->GetOne("SELECT COUNT(ID) AS dd FROM `{$maintable}` WHERE title LIKE '{$title}'");
     if ($testrow['dd'] > 0) {
示例#7
0
function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '')
{
    global $cfg_cookie_encode, $cfg_dir_purview;
    if ($dtype == "int") {
        $dvalue = trim(ereg_replace("[^0-9]", "", $dvalue));
        if ($dvalue == "") {
            $dvalue = 0;
        }
        return $dvalue;
    } else {
        if ($dtype == "float") {
            $dvalue = trim(ereg_replace("[^0-9\\.]", "", $dvalue));
            if ($dvalue == "") {
                $dvalue = 0;
            }
            return $dvalue;
        } else {
            if ($dtype == "datetime") {
                return GetMkTime($dvalue);
            } else {
                if ($dtype == "textdata") {
                    if ($job == 'edit') {
                        $addvarDirs = explode('/', $addvar);
                        $addvarDir = ereg_replace("/" . $addvarDirs[count($addvarDirs) - 1] . "\$", "", $addvar);
                        $mdir = $GLOBALS['cfg_basedir'] . $addvarDir;
                        if (!is_dir($mdir)) {
                            MkdirAll($mdir, $GLOBALS['cfg_dir_purview']);
                        }
                        $fp = fopen($GLOBALS['cfg_basedir'] . $addvar, "w");
                        fwrite($fp, stripslashes($dvalue));
                        fclose($fp);
                        CloseFtp();
                        return $addvar;
                    } else {
                        $ipath = $GLOBALS['cfg_cmspath'] . "/data/textdata";
                        $tpath = ceil($aid / 5000);
                        if (!is_dir($GLOBALS['cfg_basedir'] . $ipath)) {
                            MkdirAll($GLOBALS['cfg_basedir'] . $ipath, $cfg_dir_purview);
                        }
                        if (!is_dir($GLOBALS['cfg_basedir'] . $ipath . '/' . $tpath)) {
                            MkdirAll($GLOBALS['cfg_basedir'] . $ipath . '/' . $tpath, $cfg_dir_purview);
                        }
                        $ipath = $ipath . '/' . $tpath;
                        $filename = "{$ipath}/{$aid}-" . cn_substr(md5($cfg_cookie_encode), 0, 16) . ".txt";
                        $fp = fopen($GLOBALS['cfg_basedir'] . $filename, "w");
                        fwrite($fp, stripslashes($dvalue));
                        fclose($fp);
                        CloseFtp();
                        return $filename;
                    }
                } else {
                    if ($dtype == "img") {
                        $iurl = stripslashes($dvalue);
                        if (trim($iurl) == "") {
                            return "";
                        }
                        $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl));
                        $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}";
                        if (eregi("^http://", $iurl) && $GLOBALS['isUrlOpen']) {
                            //远程图片
                            $reimgs = "";
                            if ($isUrlOpen) {
                                $reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']);
                                if (is_array($reimgs)) {
                                    $imgurl = "{dede:img text='' width='" . $reimgs[1] . "' height='" . $reimgs[2] . "'} " . $reimgs[0] . " {/dede:img}";
                                }
                            } else {
                                $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}";
                            }
                        } else {
                            if ($iurl != "") {
                                //站内图片
                                $imgfile = $GLOBALS['cfg_basedir'] . $iurl;
                                if (is_file($imgfile)) {
                                    $imginfos = GetImageSize($imgfile, &$info);
                                    $imgurl = "{dede:img text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} {$iurl} {/dede:img}";
                                }
                            }
                        }
                        return addslashes($imgurl);
                    } else {
                        return $dvalue;
                    }
                }
            }
        }
    }
}
示例#8
0
             $v[] = addslashes($post_value);
         }
     } else {
         $v = addslashes($_POST[$row['fieldname']]);
     }
 } else {
     $v = '';
 }
 if (!empty($row['fieldcheck'])) {
     if (!preg_match($row['fieldcheck'], $v)) {
         ShowMsg($row['fieldcback']);
         exit;
     }
 }
 if ($row['fieldtype'] == 'datetime') {
     $v = GetMkTime($v);
 }
 if ($row['fieldtype'] == 'fileall') {
     $vTxt = isset($_POST[$row['fieldname'] . '_txt']) ? $_POST[$row['fieldname'] . '_txt'] : '';
     if (is_array($v) && is_array($vTxt)) {
         $vNum = count($v);
         $vTmp = '';
         for ($i = 0; $i < $vNum; $i++) {
             $vTmp[] = $v[$i] . ',' . addslashes($vTxt[$i]);
         }
         $v = serialize($vTmp);
     }
 }
 if ($row['fieldtype'] == 'checkbox') {
     @($v = implode(',', $v));
 }
示例#9
0
}
$gwhere = " WHERE 1 ";
if ($startid > 0) {
    $gwhere .= " AND id>= {$startid} ";
}
if ($endid > $startid) {
    $gwhere .= " AND id<= {$endid} ";
}
$idsql = '';
if ($typeid != 0) {
    $ids = GetSonIds($typeid);
    $gwhere .= " AND typeid IN({$ids}) ";
}
if ($seltime == 1) {
    $t1 = GetMkTime($starttime);
    $t2 = GetMkTime($endtime);
    $gwhere .= " AND (senddate >= {$t1} AND senddate <= {$t2}) ";
}
if (!empty($userid)) {
    $row = $dsql->GetOne("SELECT `mid` FROM #@__member WHERE `userid` LIKE '{$userid}'");
    if (is_array($row)) {
        $gwhere .= " AND mid = {$row['mid']} ";
    }
}
//特殊操作
if (!empty($heightdone)) {
    $action = $heightdone;
}
//指量审核
if ($action == 'check') {
    if (empty($startid) || empty($endid) || $endid < $startid) {
示例#10
0
     } else {
         $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=0 WHERE mid='{$id}' AND matt<>10 LIMIT 1");
         ShowMsg("成功取消一个会员推荐!", $ENV_GOBACK_URL);
         exit;
     }
 } else {
     if ($dopost == 'edituser') {
         CheckPurview('member_Edit');
         if (!isset($_POST['id'])) {
             exit('Request Error!');
         }
         $pwdsql = empty($pwd) ? '' : ",pwd='" . md5($pwd) . "'";
         if (empty($sex)) {
             $sex = '男';
         }
         $uptime = GetMkTime($uptime);
         if ($matt == 10 && $oldmatt != 10) {
             ShowMsg("对不起,为安全起见,不支持直接把前台会员转为管理的操作!", "-1");
             exit;
         }
         $query = "UPDATE `#@__member` SET\n            email = '{$email}',\n            uname = '{$uname}',\n            sex = '{$sex}',\n            matt = '{$matt}',\n            money = '{$money}',\n            scores = '{$scores}',\n            rank = '{$rank}',\n            spacesta='{$spacesta}',\n            uptime='{$uptime}',\n            exptime='{$exptime}'\n            {$pwdsql}\n            WHERE mid='{$id}' AND matt<>10 ";
         $rs = $dsql->ExecuteNoneQuery2($query);
         if ($rs == 0) {
             $query = "UPDATE `#@__member` SET\n            email = '{$email}',\n            uname = '{$uname}',\n            sex = '{$sex}',\n            money = '{$money}',\n            scores = '{$scores}',\n            rank = '{$rank}',\n            spacesta='{$spacesta}',\n            uptime='{$uptime}',\n            exptime='{$exptime}'\n            {$pwdsql}\n            WHERE mid='{$id}' ";
             $rs = $dsql->ExecuteNoneQuery2($query);
         }
         #api{{
         if (defined('UC_API') && @(include_once DEDEROOT . '/api/uc.func.php')) {
             $row = $dsql->GetOne("SELECT `scores`,`userid` FROM `#@__member` WHERE `mid`='{$id}' AND `matt`<>10");
             $amount = $scores - $row['scores'];
             uc_credit_note($row['userid'], $amount);
示例#11
0
<?php

/**
 * 增加任务
 *
 * @version        $Id: sys_task_add.php 1 23:07 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require dirname(__FILE__) . "/config.php";
CheckPurview('sys_Task');
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost == 'save') {
    $starttime = empty($starttime) ? 0 : GetMkTime($starttime);
    $endtime = empty($endtime) ? 0 : GetMkTime($endtime);
    $runtime = $h . ':' . $m;
    $Query = "INSERT INTO `#@__sys_task`(`taskname`,`dourl`,`islock`,`runtype`,`runtime`,`starttime`,`endtime`,`freq`,`lastrun`,`description`,`parameter`,`settime`)\n        VALUES('{$taskname}', '{$dourl}', '{$nislock}', '{$runtype}', '{$runtime}', '{$starttime}', '{$endtime}','{$freq}', '0', '{$description}','{$parameter}', '" . time() . "'); ";
    $rs = $dsql->ExecuteNoneQuery($Query);
    if ($rs) {
        ShowMsg('成功增加一个任务!', 'sys_task.php');
    } else {
        ShowMsg('增加任务失败!' . $dsql->GetError(), 'javascript:;');
    }
    exit;
}
include DedeInclude('templets/sys_task_add.htm');
示例#12
0
     $pv->SaveToHtml($homeFile);
     $pv->Close();
     ShowMsg("完成更新所有文档,现在开始更新栏目页!", "makehtml_all.php?action=make&step=4&uptype={$uptype}&mkvalue={$mkvalue}");
     exit;
 } else {
     if ($step == 4) {
         $mkvalue = intval($mkvalue);
         $typeidsok = $typeids = array();
         $adminID = $cuserLogin->getUserID();
         $mkcachefile = DEDEROOT . "/data/mkall_cache_{$adminID}.php";
         if ($uptype == 'all' || empty($mkvalue)) {
             ShowMsg("不需要进行初处理,现更新所有栏目!", "makehtml_list_action.php?gotype=mkallct");
             exit;
         } else {
             if ($uptype == 'time') {
                 $query = "Select  DISTINCT typeid From `#@__arctiny` where senddate >=" . GetMkTime($mkvalue) . " And arcrank>-1";
             } else {
                 $query = "Select DISTINCT typeid From `#@__arctiny` where id>={$mkvalue} And arcrank>-1";
             }
             $dsql->SetQuery($query);
             $dsql->Execute();
             while ($row = $dsql->GetArray()) {
                 $typeids[$row['typeid']] = 1;
             }
             foreach ($typeids as $k => $v) {
                 $vs = array();
                 $vs = GetParentIds($k);
                 if (!isset($typeidsok[$k])) {
                     $typeidsok[$k] = 1;
                 }
                 foreach ($vs as $k => $v) {
function GetFieldValue($dvalue,$dtype,$aid=0,$job='add',$addvar='',$admintype='admin')
{
	global $cfg_basedir,$cfg_cmspath,$adminID,$cfg_ml;
	
	if(!empty($adminID)) $adminid = $adminID;
	else $adminid = $cfg_ml->M_ID;
	
	if($dtype=="int"){
		return GetAlabNum($dvalue);
	}
	else if($dtype=="float"){
	  return GetAlabNum($dvalue);
	}
	else if($dtype=="datetime"){
		return GetMkTime($dvalue);
	}
	else if($dtype=="checkbox"){
		$okvalue = '';
		if(is_array($dvalue)){
			foreach($dvalue as $v){ $okvalue .= ($okvalue=='' ? $v : ",{$v}"); }
		}
		return $okvalue;
	}
	else if($dtype=="textdata")
	{
		if($job=='edit')
		{
			$addvarDirs = explode('/',$addvar);
			$addvarDir = ereg_replace("/".$addvarDirs[count($addvarDirs)-1]."$","",$addvar);
			$mdir = $cfg_basedir.$addvarDir;
			if(!is_dir($mdir)){ MkdirAll($mdir); }
			$fp = fopen($cfg_basedir.$addvar,"w");
		  fwrite($fp,stripslashes($dvalue));
		  fclose($fp);
		  CloseFtp();
	    return $addvar;
	  }else{	
		  $ipath = $cfg_cmspath."/data/textdata";
		  $tpath = ceil($aid/5000);
		  if(!is_dir($cfg_basedir.$ipath)) MkdirAll($cfg_basedir.$ipath,$GLOBALS['cfg_dir_purview']);
		  if(!is_dir($cfg_basedir.$ipath.'/'.$tpath)) MkdirAll($cfg_basedir.$ipath.'/'.$tpath,$GLOBALS['cfg_dir_purview']);
		  $ipath = $ipath.'/'.$tpath;
		  $filename = "{$ipath}/{$aid}.txt";
		  
		  $fp = fopen($cfg_basedir.$filename,"w");
		  fwrite($fp,stripslashes($dvalue));
		  fclose($fp);
		  CloseFtp();
	    return $filename;
	  }
	}
	else if($dtype=="img"||$dtype=="imgfile")
	{
		$iurl = stripslashes($dvalue);
    if(trim($iurl)=="") return "";
    $iurl = trim(str_replace($GLOBALS['cfg_basehost'],"",$iurl));
    $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}";
    if(eregi("^http://",$iurl) && $GLOBALS['cfg_isUrlOpen']) //远程图片
    {
       $reimgs = "";
       if($GLOBALS['cfg_isUrlOpen']){
	       $reimgs = GetRemoteImage($iurl,$adminid);
	       if(is_array($reimgs)){
		        if($dtype=="imgfile") $imgurl = $reimgs[1];
	          else $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}";
	       }
	     }else{
	     	  if($dtype=="imgfile") $imgurl = $iurl;
	     	  else $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}";
	     }
    }
    else if($iurl!=""){  //站内图片
	     $imgfile = $cfg_basedir.$iurl;
	     if(is_file($imgfile)){
		      $info = '';
		      $imginfos = GetImageSize($imgfile,$info);
		      if($dtype=="imgfile") $imgurl = $iurl;
		      else $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}";
	     }
    }
    return addslashes($imgurl);
	}else{
		return $dvalue;
	}
}
示例#14
0
<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('plus_常用小技巧');
if(empty($ismake)) $dopost = "";
if($ismake=="1")
{
	 $dsql = new DedeSql(false);
	 $dtime = GetMkTime($sdate);
	 $query = "update #@__archives set ismake = $ismake";
	 $dsql->SetQuery($query);
	 $dsql->ExecuteNoneQuery();
	 $dsql->Close();
	 ShowMsg("批量替换文档生成状态为【静态页面】成功!","doohickey.php");
	 exit();
}
else if($ismake=="-1")
{
	 $dsql = new DedeSql(false);
	 $dtime = GetMkTime($sdate);
	 $query = "update #@__archives set ismake = $ismake";
	 $dsql->SetQuery($query);
	 $dsql->ExecuteNoneQuery();
	 $dsql->Close();
	 ShowMsg("批量替换文档生成状态为【动态页面】成功!","doohickey.php");
	 exit();
}

require_once(dirname(__FILE__)."/doohickey.html");

ClearAllLink();
?>
示例#15
0
while ($arr = $dsql->GetArray()) {
    $starttime = $arr['starttime'];
    $endtime = $arr['endtime'];
    //跳过一次性运行,并且已经运行的任务
    if ($arr['lastrun'] > $starttime && $arr['runtype'] == 1) {
        continue;
    }
    //超过了设定的任务结束时间
    if ($endtime != 0 && $endtime < $ntime) {
        continue;
    }
    //未达到任务开始时间的任务
    if ($starttime != 0 && $ntime < $starttime) {
        continue;
    }
    $dotime = GetMkTime($ndate . ' ' . $arr['runtime'] . ':00');
    $limittime = $daylimit * $arr['freq'];
    $isplay = false;
    //判断符合执行条件的任务
    if ($arr['freq'] > 1 && $ntime - $arr['lastrun'] > $limittime) {
        $isplay = true;
    } else {
        $ndateInt = intval(str_replace('-', '', $ndate));
        $rdateInt = intval(str_replace('-', '', GetDateMk($arr['lastrun'])));
        list($th, $tm) = explode(':', $arr['runtime']);
        if ($ndateInt > $rdateInt && ($hh > $th || $hh == $th && $mm >= $tm)) {
            $isplay = true;
        }
    }
    //符合需执行条件的任务
    if ($isplay) {
示例#16
0
    if ($mobile != '') {
        $r = $dosql->GetOne("SELECT mobile FROM `{$tbname}` WHERE mobile='{$mobile}'");
        if (!empty($r['mobile'])) {
            ShowMsg('手机号码已存在!', '-1');
            exit;
        }
    }
    if ($email != '') {
        $r = $dosql->GetOne("SELECT email FROM `{$tbname}` WHERE email='{$email}'");
        if (!empty($r['email'])) {
            ShowMsg('邮箱已存在!', '-1');
            exit;
        }
    }
    $password = md5(md5($password));
    $regtime = GetMkTime($regtime);
    $regip = GetIP();
    $sql = "INSERT INTO `{$tbname}` (username, password, question, answer, cnname, enname, sex, birthtype, birth_year, birth_month, birth_day, astro, bloodtype, trade, live_prov, live_city, live_country, home_prov, home_city, home_country, cardtype, cardnum, intro, email, qqnum, mobile, telephone, address_prov, address_city, address_country, address, zipcode, enteruser, expval, integral, regtime, regip, logintime, loginip) VALUES ('{$username}', '{$password}', '{$question}', '{$answer}', '{$cnname}', '{$enname}', '{$sex}', '{$birthtype}', '{$birth_year}', '{$birth_month}', '{$birth_day}', '{$astro}', '{$bloodtype}', '{$trade}', '{$live_prov}', '{$live_city}', '{$live_country}', '{$home_prov}', '{$home_city}', '{$home_country}', '{$cardtype}', '{$cardnum}', '{$intro}', '{$email}', '{$qqnum}', '{$mobile}', '{$telephone}', '{$address_prov}', '{$address_city}', '{$address_country}', '{$address}', '{$zipcode}', '{$enteruser}', '{$expval}', '{$integral}', '{$regtime}', '{$regip}', '{$regtime}', '{$regip}')";
    if ($dosql->ExecNoneQuery($sql)) {
        header("location:{$gourl}");
        exit;
    }
} else {
    if ($action == 'update') {
        if (!isset($enteruser)) {
            $enteruser = '';
        }
        if ($password != $repassword) {
            ShowMsg('两次输入的密码不一样!', '-1');
            exit;
        }
示例#17
0
if ($cfg_notallowstr != '' && preg_match("#" . $cfg_notallowstr . "#i", $keyword)) {
    ShowMsg("你的搜索关键字中存在非法内容,被系统禁止!", "-1");
    exit;
}
if (($keyword == '' || strlen($keyword) < 2) && empty($typeid)) {
    ShowMsg('关键字不能小于2个字节!', '-1');
    exit;
}
//检查搜索间隔时间
$lockfile = DEDEDATA . '/time.lock.inc';
$lasttime = file_get_contents($lockfile);
if (!empty($lasttime) && $lasttime + $cfg_search_time > time()) {
    ShowMsg('管理员设定搜索时间间隔为' . $cfg_search_time . '秒,请稍后再试!', '-1');
    exit;
}
//开始时间
if (empty($starttime)) {
    $starttime = -1;
} else {
    $starttime = is_numeric($starttime) ? $starttime : -1;
    if ($starttime > 0) {
        $dayst = GetMkTime("2008-1-2 0:0:0") - GetMkTime("2008-1-1 0:0:0");
        $starttime = time() - $starttime * $dayst;
    }
}
$t1 = ExecTime();
$sp = new SearchView($typeid, $keyword, $orderby, $channeltype, $searchtype, $starttime, $pagesize, $kwtype, $mid);
$keyword = $oldkeyword;
$sp->Display();
PutFile($lockfile, time());
//echo ExecTime() - $t1;
示例#18
0
/**
 *  处理不同类型的数据
 *
 * @access    public
 * @param     string  $dvalue  默认值
 * @param     string  $dtype  默认类型
 * @param     int  $aid  文档ID
 * @param     string  $job  操作类型
 * @param     string  $addvar  值
 * @param     string  $admintype  管理类型
 * @param     string  $fieldname  变量类型
 * @return    string
 */
function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $admintype = 'admin', $fieldname = '')
{
    global $cfg_basedir, $cfg_cmspath, $adminid, $cfg_ml, $cfg_cookie_encode;
    if (!empty($adminid)) {
        $adminid = $adminid;
    } else {
        $adminid = isset($cfg_ml) ? $cfg_ml->M_ID : 1;
    }
    if ($dtype == 'int') {
        if ($dvalue == '') {
            return 0;
        }
        return GetAlabNum($dvalue);
    } else {
        if ($dtype == 'stepselect') {
            $dvalue = trim(preg_replace("#[^0-9\\.]#", "", $dvalue));
            return $dvalue;
        } else {
            if ($dtype == 'float') {
                if ($dvalue == '') {
                    return 0;
                }
                return GetAlabNum($dvalue);
            } else {
                if ($dtype == 'datetime') {
                    if ($dvalue == '') {
                        return 0;
                    }
                    return GetMkTime($dvalue);
                } else {
                    if ($dtype == 'checkbox') {
                        $okvalue = '';
                        if (is_array($dvalue)) {
                            $okvalue = join(',', $dvalue);
                        }
                        return $okvalue;
                    } else {
                        if ($dtype == "htmltext") {
                            if ($admintype == 'member' || $admintype == 'diy') {
                                $dvalue = HtmlReplace($dvalue, -1);
                            }
                            return $dvalue;
                        } else {
                            if ($dtype == "multitext") {
                                if ($admintype == 'member' || $admintype == 'diy') {
                                    $dvalue = HtmlReplace($dvalue, 0);
                                }
                                return $dvalue;
                            } else {
                                if ($dtype == "textdata") {
                                    $ipath = $cfg_cmspath . "/data/textdata";
                                    $tpath = ceil($aid / 5000);
                                    if (!is_dir($cfg_basedir . $ipath)) {
                                        MkdirAll($cfg_basedir . $ipath, $GLOBALS['cfg_dir_purview']);
                                    }
                                    if (!is_dir($cfg_basedir . $ipath . '/' . $tpath)) {
                                        MkdirAll($cfg_basedir . $ipath . '/' . $tpath, $GLOBALS['cfg_dir_purview']);
                                    }
                                    $ipath = $ipath . '/' . $tpath;
                                    $filename = "{$ipath}/{$aid}-" . cn_substr(md5($cfg_cookie_encode), 0, 16) . ".txt";
                                    //会员投稿内容安全处理
                                    if ($admintype == 'member' || $admintype == 'diy') {
                                        $dvalue = HtmlReplace($dvalue, -1);
                                    }
                                    $fp = fopen($cfg_basedir . $filename, "w");
                                    fwrite($fp, stripslashes($dvalue));
                                    fclose($fp);
                                    CloseFtp();
                                    return $filename;
                                } else {
                                    if ($dtype == 'img' || $dtype == 'imgfile') {
                                        if (preg_match("#[\\|/]uploads[\\|/]userup#", $dvalue)) {
                                            return $dvalue;
                                        }
                                        if ($admintype == 'diy') {
                                            $iurl = MemberUploads($fieldname, '', 0, 'image', '', -1, -1, false);
                                            return $iurl;
                                        }
                                        $iurl = stripslashes($dvalue);
                                        if (trim($iurl) == '') {
                                            return '';
                                        }
                                        $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl));
                                        $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}";
                                        if (preg_match("/^http:\\/\\//i", $iurl) && $GLOBALS['cfg_isUrlOpen']) {
                                            //远程图片
                                            $reimgs = '';
                                            if ($GLOBALS['cfg_isUrlOpen']) {
                                                $reimgs = GetRemoteImage($iurl, $adminid);
                                                if (is_array($reimgs)) {
                                                    if ($dtype == 'imgfile') {
                                                        $imgurl = $reimgs[1];
                                                    } else {
                                                        $imgurl = "{dede:img text='' width='" . $reimgs[1] . "' height='" . $reimgs[2] . "'} " . $reimgs[0] . " {/dede:img}";
                                                    }
                                                }
                                            } else {
                                                if ($dtype == 'imgfile') {
                                                    $imgurl = $iurl;
                                                } else {
                                                    $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}";
                                                }
                                            }
                                        } else {
                                            if ($iurl != '') {
                                                //站内图片
                                                $imgfile = $cfg_basedir . $iurl;
                                                if (is_file($imgfile)) {
                                                    $info = '';
                                                    $imginfos = GetImageSize($imgfile, $info);
                                                    if ($dtype == "imgfile") {
                                                        $imgurl = $iurl;
                                                    } else {
                                                        $imgurl = "{dede:img text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} {$iurl} {/dede:img}";
                                                    }
                                                }
                                            }
                                        }
                                        return addslashes($imgurl);
                                    } else {
                                        if ($dtype == 'addon' && $admintype == 'diy') {
                                            if (preg_match("#[\\|/]uploads[\\|/]userup#", $dvalue)) {
                                                return $dvalue;
                                            }
                                            $dvalue = MemberUploads($fieldname, '', 0, 'addon', '', -1, -1, false);
                                            return $dvalue;
                                        } else {
                                            if ($admintype == 'member' || $admintype == 'diy') {
                                                $dvalue = HtmlReplace($dvalue, 1);
                                            }
                                            return $dvalue;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
	$tpids = '';
	$idArrary = TypeGetSunTypes($typeid,$dsql,0);
	if(is_array($idArrary))
	{
	  
	  foreach($idArrary as $tid){
	  	$tpids = ($tpids=='' ? $tid : ','.$tid);
	  }
	  $idsql = " And typeid in ($tpids)";
  }
  $idsql = $gwhere.$idsql;
}
if($idsql=="") $idsql = $gwhere;
if($seltime==1){
	 $t1 = GetMkTime($stime);
	 $t2 = GetMkTime($etime);
	 $idsql .= " And (senddate >= $t1 And senddate <= $t2) ";
}
//统计记录总数
//------------------------
if($totalnum==0)
{
	$row = $dsql->GetOne("Select count(*) as dd From #@__archives $idsql");
	$totalnum = $row['dd'];
}

//获取记录,并生成缩略图---
if($totalnum > $startdd+$pagesize)
{
	$limitSql = " limit $startdd,$pagesize";
}else
示例#20
0
    if (empty($nickname) or empty($content) or empty($validate)) {
        header('location:message.php');
        exit;
    }
    //检测数据正确性
    if (strtolower($validate) != strtolower(GetCkVdValue())) {
        ResetVdValue();
        ShowMsg('验证码不正确!', '?c=login');
        exit;
    } else {
        $r = $dosql->GetOne("SELECT Max(orderid) AS orderid FROM `#@__message`");
        $orderid = empty($r['orderid']) ? 1 : $r['orderid'] + 1;
        $nickname = htmlspecialchars($nickname);
        $contact = htmlspecialchars($contact);
        $content = htmlspecialchars($content);
        $posttime = GetMkTime(time());
        $ip = gethostbyname($_SERVER['REMOTE_ADDR']);
        $sql = "INSERT INTO `#@__message` (siteid, nickname, contact, content, orderid, posttime, htop, rtop, checkinfo, ip) VALUES (1, '{$nickname}', '{$contact}', '{$content}', '{$orderid}', '{$posttime}', '', '', 'false', '{$ip}')";
        if ($dosql->ExecNoneQuery($sql)) {
            ShowMsg('留言成功,感谢您的支持!', 'message.php');
            exit;
        }
    }
}
//验证码获取函数
function GetCkVdValue()
{
    if (!isset($_SESSION)) {
        session_start();
    }
    return isset($_SESSION['ckstr']) ? $_SESSION['ckstr'] : '';
示例#21
0
 $istarttime = GetMkTime($starttime) - 7 * 24 * 3600;
 $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'";
 $dsql->Execute('me', $sql);
 while ($frow = $dsql->GetArray('me')) {
     $ddw = empty($ddw) ? "0" : $ddw;
     $ccw = empty($ccw) ? "0" : $ccw;
     $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
     $ddw += $row['dd'];
     $ccw += $row['cc'];
 }
 $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
 $ddw = $row['dd'] + $ddw;
 $ccw = $row['cc'] + $ccw;
 //当天
 $starttime = $y . "-{$m}-{$d} 00:00:00";
 $istarttime = GetMkTime($starttime);
 $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'";
 $dsql->Execute('me', $sql);
 while ($frow = $dsql->GetArray('me')) {
     $ddd = empty($ddd) ? "0" : $ddd;
     $ccd = empty($ccd) ? "0" : $ccd;
     $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
     $ddd += $row['dd'];
     $ccd += $row['cc'];
 }
 $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
 $ddd = $row['dd'] + $ddd;
 $ccd = $row['cc'] + $ccd;
 $msg = "<table width='96%' border='0' align='center' cellpadding='3' cellspacing='1' bgcolor='#cfcfcf'>\r\n    <tr align='center' bgcolor='#FBFCE2'>\r\n      <td width='18%' height='26'><strong>管理员↓|统计信息→</strong></td>\r\n      <td width='18%'><strong>全部(文档|点击)</strong></td>\r\n      <td width='16%'><strong>季度</strong></td>\r\n      <td width='16%'><strong>当月</strong></td>\r\n      <td width='16%'><strong>近七天</strong></td>\r\n      <td width='16%'><strong>当天</strong></td>\r\n    </tr>\r\n    <tr align='center' bgcolor='#FFFFFF'>\r\n      <td height='26'>{$userid}</td>\r\n      <td>{$dd} | {$cc}</td>\r\n      <td>{$dds} | {$ccs}</td>\r\n      <td>{$ddm} | {$ccm}</td>\r\n      <td>{$ddw} | {$ccw}</td>\r\n      <td>{$ddd} | {$ccd}</td>\r\n    </tr>\r\n    </table><br style='clear:both'/>\r\n";
 AjaxHead();
 echo $msg;
示例#22
0
$gourl = 'weblink.php';
$action = isset($action) ? $action : '';
//引入操作类
require_once ADMIN_INC . '/action.class.php';
//添加友情链接
if ($action == 'add') {
    $r = $dosql->GetOne("SELECT parentid FROM `#@__weblinktype` WHERE id={$classid}");
    $parentid = $r['parentid'];
    $parentstr = $doaction->GetParentStr();
    $posttime = GetMkTime($posttime);
    $sql = "INSERT INTO `{$tbname}` (siteid, classid, parentid, parentstr, webname, linkurl, webnote, picurl, orderid, posttime, checkinfo) VALUES ('{$cfg_siteid}', '{$classid}', '{$parentid}', '{$parentstr}', '{$webname}', '{$linkurl}', '{$webnote}', '{$picurl}', '{$orderid}', '{$posttime}', '{$checkinfo}');";
    if ($dosql->ExecNoneQuery($sql)) {
        header("location:{$gourl}");
        exit;
    }
} else {
    if ($action == 'update') {
        $r = $dosql->GetOne("SELECT parentid FROM `#@__weblinktype` WHERE id={$classid}");
        $parentid = $r['parentid'];
        $parentstr = $doaction->GetParentStr();
        $posttime = GetMkTime($posttime);
        $sql = "UPDATE `{$tbname}` SET siteid='{$cfg_siteid}', classid='{$classid}', parentid='{$parentid}', parentstr='{$parentstr}', webname='{$webname}', linkurl='{$linkurl}', webnote='{$webnote}', picurl='{$picurl}', orderid='{$orderid}', posttime='{$posttime}', checkinfo='{$checkinfo}' WHERE id={$id}";
        if ($dosql->ExecNoneQuery($sql)) {
            header("location:{$gourl}");
            exit;
        }
    } else {
        header("location:{$gourl}");
        exit;
    }
}
示例#23
0
<?php 
require(dirname(__FILE__)."/config.php");
CheckPurview('plus_投票模块');
if(empty($dopost)) $dopost = "";
//////////////////////////////////////////
if($dopost=="save")
{
	//$ismore,$votename
	$starttime = GetMkTime($starttime);
	$endtime = GetMkTime($endtime);
	$voteitems = "";
	$j=0;
	for($i=1;$i<=15;$i++)
	{
		if(!empty(${"voteitem".$i})){
			$j++;
			$voteitems .= "<v:note id=\\'$j\\' count=\\'0\\'>".${"voteitem".$i}."</v:note>\r\n";
		}
	}
	$dsql = new DedeSql(false);
	$inQuery = "
	insert into #@__vote(votename,starttime,endtime,totalcount,ismore,votenote) 
	Values('$votename','$starttime','$endtime','0','$ismore','$voteitems');
	";
	$dsql->SetQuery($inQuery);
	if(!$dsql->ExecuteNoneQuery())
	{
		$dsql->Close();
		ShowMsg("增加投票失败,请检查数据是否非法!","-1");
		exit();
	}
示例#24
0
 function GetData($fname)
 {
     $reValue = '';
     $ftype = $this->fields[$fname]['type'];
     $GLOBALS[$fname] = isset($GLOBALS[$fname]) ? $GLOBALS[$fname] : @$GLOBALS['request']->forms[$fname];
     //二进制单独处理
     if (in_array($ftype, $this->binTypes)) {
         return $this->GetBinData($fname);
     } else {
         if (!isset($GLOBALS[$fname])) {
             if (isset($this->fields[$fname]['default'])) {
                 return $this->fields[$fname]['default'];
             } else {
                 if (in_array($ftype, $this->intTypes) || in_array($ftype, $this->floatTypes)) {
                     return 0;
                 } else {
                     if (in_array($ftype, $this->charTypes) || in_array($ftype, $this->textTypes)) {
                         return '';
                     } else {
                         return 'NULL';
                     }
                 }
             }
         } else {
             if (preg_match("#YEAR|INT#", $ftype)) {
                 // $temp = isset($GLOBALS[$fname][0])? $GLOBALS[$fname][0] : 0;
                 $negTag = is_int($GLOBALS[$fname]) && $GLOBALS[$fname] < 0 ? '-' : $GLOBALS[$fname];
                 $reValue = preg_replace("#[^0-9]#", '', $GLOBALS[$fname]);
                 $reValue = empty($reValue) ? 0 : intval($reValue);
                 if ($negTag == '-' && !$this->fields[$fname]['unsigned'] && $reValue != 0 && $ftype != 'YEAR') {
                     $reValue = intval('-' . $reValue);
                 }
             } else {
                 if (in_array($ftype, $this->floatTypes)) {
                     $negTag = $GLOBALS[$fname][0];
                     $reValue = preg_replace("#[^0-9\\.]|^\\.#", '', $GLOBALS[$fname]);
                     $reValue = empty($reValue) ? 0 : doubleval($reValue);
                     if ($negTag == '-' && !$this->fields[$fname]['unsigned'] && $reValue != 0) {
                         $reValue = intval('-' . $reValue);
                     }
                 } else {
                     if (in_array($ftype, $this->charTypes)) {
                         $reValue = cn_substrR($this->StringSafe($GLOBALS[$fname]), $this->fields[$fname]['length']);
                     } else {
                         if (in_array($ftype, $this->textTypes)) {
                             $reValue = $this->StringSafe($GLOBALS[$fname]);
                         } else {
                             if ($ftype == 'SET') {
                                 $sysSetArr = explode(',', $this->fields[$fname]['em']);
                                 if (!is_array($GLOBALS[$fname])) {
                                     $setArr[] = $GLOBALS[$fname];
                                 } else {
                                     $setArr = $GLOBALS[$fname];
                                 }
                                 $reValues = array();
                                 foreach ($setArr as $a) {
                                     if (in_array($a, $sysSetArr)) {
                                         $reValues[] = $a;
                                     }
                                 }
                                 $reValue = count($reValues) == 0 ? 'NULL' : join(',', $reValues);
                             } else {
                                 if ($ftype == 'ENUM') {
                                     $sysEnumArr = explode(',', $this->fields[$fname]['em']);
                                     if (in_array($GLOBALS[$fname], $sysEnumArr)) {
                                         $reValue = $GLOBALS[$fname];
                                     } else {
                                         $reValue = 'NULL';
                                     }
                                 } else {
                                     if (in_array($ftype, $this->dateTypes)) {
                                         if ($ftype == 'TIMESTAMP') {
                                             $reValue = GetMkTime($GLOBALS[$fname]);
                                         } else {
                                             $reValue = preg_replace("#[^0-9 :-]#", '', $GLOBALS[$fname]);
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $reValue;
 }
示例#25
0
     ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1");
     exit;
 }
 if (!CheckChannel($typeid, $channelid)) {
     ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1");
     exit;
 }
 if (!TestPurview('a_Edit')) {
     if (TestPurview('a_AccEdit')) {
         CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!");
     } else {
         CheckArcAdmin($id, $cuserLogin->getUserID());
     }
 }
 //对保存的内容进行处理
 $pubdate = GetMkTime($pubdate);
 $sortrank = AddDay($pubdate, $sortup);
 $ismake = $ishtml == 0 ? -1 : 0;
 $autokey = 1;
 //$title = htmlspecialchars(cn_substrR($title,$cfg_title_maxlen,ENT_COMPAT ,"GB2312"));
 $shorttitle = cn_substrR($shorttitle, 36);
 $color = cn_substrR($color, 7);
 $writer = cn_substrR($writer, 20);
 $source = cn_substrR($source, 30);
 $description = cn_substrR($description, 250);
 $keywords = trim(cn_substrR($keywords, 60));
 $filename = trim(cn_substrR($filename, 40));
 $isremote = empty($isremote) ? 0 : $isremote;
 $serviterm = empty($serviterm) ? "" : $serviterm;
 if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) {
     $arcrank = -1;
    <td id="table_style" class="r_t">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
	<table width="100%" border="0" cellpadding="0" cellspacing="2">
     <tr>
      <td><strong>&nbsp;产品基本信息管理</strong>(注:橙色背景为必填选项)&nbsp;&nbsp;- <a href="system_basic_cp.php">新产品登记</a> - <a href="system_basic_cp.php?action=seek">产品基本信息查询</a></td>
     </tr><form action="system_basic_cp.php?action=save" method="post" name="form1">
     <tr>
      <td bgcolor="#FFFFFF">
 <table width="100%" border="0" cellspacing="0" cellpadding="0" id="table_border">
   <tr>
    <td class="cellcolor">产品货号:</td>
    <td>&nbsp;<input type="text" name="cp_number" value="<?php 
        echo GetMkTime(time());
        ?>
" style="background:transparent;border:0px;color:red;font-weight:bold;font-family:Verdana, Arial, Helvetica, sans-serif;" readonly></td>
  </tr>
  <tr>
    <td class="cellcolor" width="30%">产品条形码:<br>(如有条码扫描仪可直接扫描)</td>
    <td>&nbsp;<input type="text" name="cp_tm">&nbsp;如使用条形码,销售时可直接使用</td>
  </tr>  
  <tr>
    <td class="cellcolor" width="30%">产品名称:</td>
    <td>&nbsp;<input type="text" name="cp_name" id="need" onblur="pinyin(this.value)"></td>
  </tr>
  <tr>
    <td class="cellcolor">产品规格:</td>
    <td>&nbsp;<input type="text" name="cp_gg" id="need"></td>
  </tr>