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


PHP to_time函数代码示例

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


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

示例1: lists

 protected function lists($offset)
 {
     $where['status'] = 1;
     if ($offset) {
         $where = array('id' => array('gt', $offset));
     } else {
         $limit = 10;
     }
     $data = $this->order('id desc')->limit($limit)->where($where)->select(array('hy' => true));
     if (!is_array($data) || !count($data)) {
         return false;
     }
     $max = $data[0]['id'];
     $data = array_reverse($data);
     $userId = ss_uid();
     foreach ($data as $k => &$v) {
         $v['user_id_text'] = $v['user_id_text'];
         $v['create_time'] = to_time($v['create_time'], 5);
         if ($userId == $v['user_id']) {
             $v['avatar_file'] = session('avatarFile');
         } else {
             $v['avatar_file'] = avatar_file($v['avatar_file']);
         }
         unset($v['id']);
     }
     return array('list' => $data, 'offset' => $max);
 }
开发者ID:homyit,项目名称:HyFrame,代码行数:27,代码来源:HyChatModel.class.php

示例2: ReNewsHtml

function ReNewsHtml($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $havehtml)
{
    global $empire, $public_r, $class_r, $fun_r, $dbtbpre, $etable_r;
    $tbname = RepPostVar($tbname);
    if (empty($tbname)) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    $start = (int) $start;
    //按ID
    if ($retype) {
        $startid = (int) $startid;
        $endid = (int) $endid;
        $add1 = $endid ? ' and id>=' . $startid . ' and id<=' . $endid : '';
    } else {
        $startday = RepPostVar($startday);
        $endday = RepPostVar($endday);
        $add1 = $startday && $endday ? ' and truetime>=' . to_time($startday . ' 00:00:00') . ' and truetime<=' . to_time($endday . ' 23:59:59') : '';
    }
    //按栏目
    $classid = (int) $classid;
    if ($classid) {
        $where = empty($class_r[$classid][islast]) ? ReturnClass($class_r[$classid][sonclass]) : "classid='{$classid}'";
        $add1 .= ' and ' . $where;
    }
    //不生成
    $add1 .= ReturnNreInfoWhere();
    //是否重复生成
    if ($havehtml != 1) {
        $add1 .= ' and havehtml=0';
    }
    //优化
    $yhadd = '';
    $yhid = $etable_r[$tbname][yhid];
    $yhvar = 'rehtml';
    if ($yhid) {
        $yhadd = ReturnYhSql($yhid, $yhvar);
    }
    $b = 0;
    $sql = $empire->query("select * from {$dbtbpre}ecms_" . $tbname . " where " . $yhadd . "id>{$start}" . $add1 . " and checked=1 order by id limit " . $public_r[renewsnum]);
    while ($r = $empire->fetch($sql)) {
        if (!empty($r['titleurl']) || $class_r[$r[classid]][showdt] == 2) {
            continue;
        }
        $b = 1;
        GetHtml($r, '', 1);
        //生成信息文件
        $new_start = $r[id];
    }
    if (empty($b)) {
        echo "<link rel=\"stylesheet\" href=\"../data/images/css.css\" type=\"text/css\"><center><b>" . $tbname . $fun_r[ReTableIsOK] . "!</b></center>";
        db_close();
        $empire = null;
        exit;
    }
    echo "<link rel=\"stylesheet\" href=\"../data/images/css.css\" type=\"text/css\"><meta http-equiv=\"refresh\" content=\"" . $public_r['realltime'] . ";url=ecmschtml.php?enews=ReNewsHtml&tbname={$tbname}&classid={$classid}&start={$new_start}&from={$from}&retype={$retype}&startday={$startday}&endday={$endday}&startid={$startid}&endid={$endid}&havehtml={$havehtml}&reallinfotime=" . $_GET['reallinfotime'] . "\">" . $fun_r[OneReNewsHtmlSuccess] . "(ID:<font color=red><b>" . $new_start . "</b></font>)";
    exit;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:57,代码来源:chtmlfun.php

示例3: ChangeInfoOtherLink

function ChangeInfoOtherLink($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $userid, $username)
{
    global $empire, $public_r, $class_r, $fun_r, $dbtbpre;
    //验证权限
    CheckLevel($userid, $username, $classid, "changedata");
    $start = (int) $start;
    $tbname = RepPostVar($tbname);
    if (empty($tbname)) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    //按栏目刷新
    $classid = (int) $classid;
    if ($classid) {
        if (empty($class_r[$classid][islast])) {
            $where = ReturnClass($class_r[$classid][sonclass]);
        } else {
            $where = "classid='{$classid}'";
        }
        $add1 = " and (" . $where . ")";
    }
    //按ID刷新
    if ($retype) {
        $startid = (int) $startid;
        $endid = (int) $endid;
        if ($endid) {
            $add1 .= " and id>={$startid} and id<={$endid}";
        }
    } else {
        $startday = RepPostVar($startday);
        $endday = RepPostVar($endday);
        if ($startday && $endday) {
            $add1 .= " and truetime>=" . to_time($startday . " 00:00:00") . " and truetime<=" . to_time($endday . " 23:59:59");
        }
    }
    $b = 0;
    $sql = $empire->query("select id,keyboard,classid from {$dbtbpre}ecms_" . $tbname . " where id>{$start}" . $add1 . " order by id limit " . $public_r[infolinknum]);
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        $new_start = $r[id];
        //手动相关链接
        $infopr = $empire->fetch1("select diyotherlink from {$dbtbpre}enewsinfovote where id='{$r['id']}' and classid='{$r['classid']}' limit 1");
        if ($infopr['diyotherlink']) {
            continue;
        }
        $newkeyid = GetKeyid($r[keyboard], $r[classid], $r[id], $class_r[$r[classid]][link_num]);
        $usql = $empire->query("update {$dbtbpre}ecms_" . $tbname . " set keyid='{$newkeyid}' where id={$r['id']}");
    }
    if (empty($b)) {
        insert_dolog("");
        //操作日志
        printerror("ChangeInfoLinkSuccess", $from);
    }
    echo $fun_r[OneChangeInfoLinkSuccess] . "(ID:<font color=red><b>" . $new_start . "</b></font>)<script>self.location.href='ecmscom.php?enews=ChangeInfoOtherLink&tbname={$tbname}&classid={$classid}&start={$new_start}&from={$from}&retype={$retype}&startday={$startday}&endday={$endday}&startid={$startid}&endid={$endid}';</script>";
    exit;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:55,代码来源:comdofun.php

示例4: ReInfoUrl

function ReInfoUrl($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $userid, $username)
{
    global $empire, $public_r, $class_r, $fun_r, $dbtbpre;
    //验证权限
    //CheckLevel($userid,$username,$classid,"changedata");
    $start = (int) $start;
    $tbname = RepPostVar($tbname);
    if (empty($tbname) || !eCheckTbname($tbname)) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    $add1 = '';
    //按栏目刷新
    $classid = (int) $classid;
    if ($classid) {
        if (empty($class_r[$classid][islast])) {
            $where = ReturnClass($class_r[$classid][sonclass]);
        } else {
            $where = "classid='{$classid}'";
        }
        $add1 = " and (" . $where . ")";
    }
    //按ID刷新
    if ($retype) {
        $startid = (int) $startid;
        $endid = (int) $endid;
        if ($endid) {
            $add1 .= " and id>={$startid} and id<={$endid}";
        }
    } else {
        $startday = RepPostVar($startday);
        $endday = RepPostVar($endday);
        if ($startday && $endday) {
            $add1 .= " and truetime>=" . to_time($startday . " 00:00:00") . " and truetime<=" . to_time($endday . " 23:59:59");
        }
    }
    $b = 0;
    $sql = $empire->query("select id,classid,checked from {$dbtbpre}ecms_" . $tbname . "_index where id>{$start}" . $add1 . " order by id limit " . $public_r[delnewsnum]);
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        $new_start = $r[id];
        //返回表
        $infotb = ReturnInfoMainTbname($tbname, $r['checked']);
        $infor = $empire->fetch1("select newspath,filename,groupid,isurl,titleurl from " . $infotb . " where id='{$r['id']}' limit 1");
        $infourl = GotoGetTitleUrl($r['classid'], $r['id'], $infor['newspath'], $infor['filename'], $infor['groupid'], $infor['isurl'], $infor['titleurl']);
        $empire->query("update " . $infotb . " set titleurl='{$infourl}' where id='{$r['id']}' limit 1");
    }
    if (empty($b)) {
        insert_dolog("");
        //操作日志
        printerror("ReInfoUrlSuccess", $from);
    }
    echo $fun_r[OneReInfoUrlSuccess] . "(ID:<font color=red><b>" . $new_start . "</b></font>)<script>self.location.href='ReInfoUrl.php?enews=ReInfoUrl&tbname={$tbname}&classid={$classid}&start={$new_start}&from=" . urlencode($from) . "&retype={$retype}&startday={$startday}&endday={$endday}&startid={$startid}&endid={$endid}" . hReturnEcmsHashStrHref(0) . "';</script>";
    exit;
}
开发者ID:novnan,项目名称:meiju,代码行数:54,代码来源:ReInfoUrl.php

示例5: DelDownRecord

function DelDownRecord($add, $userid, $username)
{
    global $empire, $dbtbpre;
    if (empty($add['downtime'])) {
        printerror("EmptyDownTime", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "deldownrecord");
    $truetime = to_time($add['downtime']);
    $sql = $empire->query("delete from {$dbtbpre}enewsdownrecord where truetime<=" . $truetime);
    if ($sql) {
        //操作日志
        insert_dolog("time={$add['downtime']}");
        printerror("DelDownRecordSuccess", "DelDownRecord.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:18,代码来源:DelDownRecord.php

示例6: time

  </tr>
  <?php 
$totime = time();
$today = date("Y-m-d");
$yesterday = date("Y-m-d", $totime - 24 * 3600);
$month = date("Y-m");
//本月最大天数
$maxday = date("t", mktime(0, 0, 0, date("m"), date("d"), date("Y")));
while ($r = $empire->fetch($sql)) {
    $tquery = "select count(*) as total from {$dbtbpre}ecms_" . $tbname . " where userid='{$r['userid']}' and ismember=0";
    //今天发布数
    $todaynum = $empire->gettotal($tquery . " and truetime>=" . to_time($today . " 00:00:00") . " and truetime<=" . to_time($today . " 23:59:59"));
    //昨天发布数
    $yesterdaynum = $empire->gettotal($tquery . " and truetime>=" . to_time($yesterday . " 00:00:00") . " and truetime<=" . to_time($yesterday . " 23:59:59"));
    //本月发布数
    $monthnum = $empire->gettotal($tquery . " and truetime>=" . to_time($month . "-01 00:00:00") . " and truetime<=" . to_time($month . "-" . $maxday . " 23:59:59"));
    //所有
    $totalnum = $empire->gettotal($tquery);
    //未审核
    $nochecktotalnum = $empire->gettotal($tquery . " and checked=0");
    ?>
  <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'"> 
    <td height="25"><div align="center"><a href="AddUser.php?enews=EditUser&userid=<?php 
    echo $r[userid];
    ?>
" target="_blank">
        <u><?php 
    echo $r[username];
    ?>
</u>
        </a></div></td>
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:UserTotal.php

示例7: CjNewsIn_all


//.........这里部分代码省略.........
                    $r[id] = (int) $r[id];
                    //记录数据库
                    eInsertFileTable($tranr[filename], $tranr[filesize], $tranr[filepath], $username, $cr[newsclassid], '[URL]' . $tranr[filename], $tranr[type], 0, $r[id], $public_r[fpath], 0, 0, $public_r['filedeftb']);
                    $value = $tranr[url];
                }
            }
            //存放文本
            if ($savetxtf == $dofield) {
                //建立目录
                $thetxtfile = GetFileMd5();
                $truevalue = MkDirTxtFile(date("Y/md"), $thetxtfile);
                //写放文件
                EditTxtFieldText($truevalue, $value);
                $value = $truevalue;
            }
            $value = addslashes($value);
            if (strstr($emod_r[$mid]['tbdataf'], ',' . $dofield . ',')) {
                $dataifield .= "," . $dofield;
                $dataivalue .= ",'" . $value . "'";
            } else {
                $ifield .= "," . $dofield;
                $ivalue .= ",'" . $value . "'";
            }
        }
        $r[keyboard] = addslashes($r[keyboard]);
        //时间
        if ($uptime) {
            $r[newstime] = $todaytime;
            $r[truetime] = $todaytime;
        } else {
            if ($r[newstime] == "0000-00-00 00:00:00") {
                $r[newstime] = $todaytime;
            } else {
                $r[newstime] = to_time($r[newstime]);
            }
        }
        //查看目录是否存在,不存在则建立
        $newspath = FormatPath($cr[newsclassid], "", 0);
        //强制签发
        if ($class_r[$cr[newsclassid]][wfid]) {
            $checked = 0;
            $isqf = 1;
        } else {
            $checked = $checked;
            $isqf = 0;
        }
        //变量处理
        $newstempid = 0;
        $ispic = $r[titlepic] ? 1 : 0;
        //返回关键字
        $keyid = GetKeyid($r[keyboard], $cr[newsclassid], 0, $class_r[$cr[newsclassid]][link_num]);
        //索引表
        $havehtml = 0;
        $indexsql = $empire->query("insert into {$dbtbpre}ecms_" . $class_r[$cr[newsclassid]][tbname] . "_index(classid,checked,newstime,truetime,lastdotime,havehtml) values('{$cr['newsclassid']}','{$checked}','{$r['newstime']}','{$r['truetime']}','{$r['truetime']}','{$havehtml}');");
        $id = $empire->lastid();
        $infotbr = ReturnInfoTbname($class_r[$cr[newsclassid]][tbname], $checked, $stb);
        //主表
        $isurl = $r['titleurl'] ? 1 : 0;
        $isql = $empire->query("insert into " . $infotbr['tbname'] . "(id,classid,ttid,onclick,plnum,totaldown,newspath,filename,userid,username,firsttitle,isgood,ispic,istop,isqf,ismember,isurl,truetime,lastdotime,havehtml,groupid,userfen,titlefont,titleurl,stb,fstb,restb,keyboard,newstime" . $ifield . ") values('{$id}','{$cr['newsclassid']}',0,0,0,0,'{$newspath}','{$filename}','{$r['userid']}','{$r['username']}',0,0,'{$ispic}',0,'{$isqf}',0,'{$isurl}','{$r['truetime']}','{$r['truetime']}','{$havehtml}',0,0,'{$r['titlefont']}','{$r['titleurl']}','{$stb}','{$public_r['filedeftb']}','{$public_r['pldeftb']}','{$r['keyboard']}','{$r['newstime']}'" . $ivalue . ");");
        //副表
        $fisql = $empire->query("insert into " . $infotbr['datatbname'] . "(id,classid,keyid,dokey,newstempid,closepl,haveaddfen,infotags" . $dataifield . ") values('{$id}','{$cr['newsclassid']}','{$keyid}',1,'{$newstempid}',0,0,''" . $dataivalue . ");");
        //更新栏目信息数
        AddClassInfos($cr['newsclassid'], '+1', '+1', $checked);
        //更新新信息数
        DoUpdateAddDataNum('info', $class_r[$cr['newsclassid']]['tid'], 1);
        //签发
开发者ID:novnan,项目名称:meiju,代码行数:67,代码来源:cjfun.php

示例8: ReturnAddF

function ReturnAddF($add, $modid, $userid, $username, $do = 0, $rdata = 0, $ch = 0)
{
    global $empire, $public_r, $dbtbpre, $emod_r;
    if ($do == 0 || $do == 1) {
        //导入gd处理文件
        if ($add['mark'] || $add['getfirsttitlespic'] || $add['mcreatespic']) {
            include_once ECMS_PATH . 'e/class/gd.php';
        }
    }
    $ret_r['tb'] = $emod_r[$modid]['deftb'];
    $r = explode(',', $emod_r[$modid][enter]);
    $count = count($r) - 1;
    if (empty($do)) {
        //数据库操作
        for ($i = 1; $i < $count; $i++) {
            $f = $r[$i];
            if ($f == 'special.field' || !strstr($emod_r[$modid]['canaddf'], ',' . $f . ',')) {
                continue;
            }
            $add[$f] = ReturnCheckboxAddF($add[$f], $modid, $f);
            //复选框
            $value = RepPhpAspJspcodeText($add[$f]);
            if ($f == 'newstime') {
                $value = empty($value) ? time() : to_time($value);
            } elseif ($f == "morepic") {
                $value = ReturnMorepicpath($add['msmallpic'], $add['mbigpic'], $add['mpicname'], $add['mdelpicid'], $add['mpicid'], $add, $add['mpicurl_qz'], 0);
            } elseif ($f == "downpath") {
                $value = ReturnDownpath($add['downname'], $add['downpath'], $add['delpathid'], $add['pathid'], $add['downuser'], $add['fen'], $add['thedownqz'], $add, $add['foruser'], $add['downurl_qz'], 0);
            } elseif ($f == "onlinepath") {
                $value = ReturnDownpath($add['odownname'], $add['odownpath'], $add['odelpathid'], $add['opathid'], $add['odownuser'], $add['ofen'], $add['othedownqz'], $add, $add['oforuser'], $add['onlineurl_qz'], 0);
            } elseif ($f == "smalltext") {
                if (!trim($value)) {
                    $value = SubSmalltextVal($add[newstext], $public_r[smalltextlen]);
                    //截取新闻内容
                }
            } elseif ($f == 'infoip') {
                $value = egetip();
            } elseif ($f == 'infozm') {
                $value = $value ? $value : GetInfoZm($add[title]);
            }
            //处理函数
            $value = DoFFun($modid, $f, $value, 1, 0);
            //检测必填字段
            if ($ch == 1 && empty($add['titleurl'])) {
                ChMustAddF($modid, $f, $value);
                ChIsOnlyAddF($modid, 0, $f, $value, 0);
                //唯一值
            }
            //编辑器
            if ($f == "newstext") {
                //远程保存
                $value = addslashes(CopyImg(stripSlashes($value), $add[copyimg], $add[copyflash], $add[classid], $add[qz_url], $username, $add['id'], $add['filepass'], $add['mark']));
                //替换关键字和字符
                $value = DoReplaceKeyAndWord($value, $add['dokey']);
                //自动分页
                if ($add[autopage] && !strstr($value, "[!--empirenews.page--]")) {
                    if (empty($add[autosize])) {
                        $add[autosize] = 5000;
                    }
                    $value = AutoDoPage($value, $add[autosize]);
                }
            }
            //存文本
            if ($emod_r[$modid]['savetxtf'] && $f == $emod_r[$modid]['savetxtf']) {
                //建立目录
                $thetxtfile = GetFileMd5();
                $truevalue = MkDirTxtFile(date("Y/md"), $thetxtfile);
                //写放文件
                EditTxtFieldText($truevalue, $value);
                $value = $truevalue;
            }
            if (strstr($emod_r[$modid]['tbdataf'], ',' . $f . ',')) {
                $ret_r['datafields'] .= "," . $f;
                $ret_r['datavalues'] .= ",'" . addslashes($value) . "'";
            } else {
                $ret_r['fields'] .= "," . $f;
                $ret_r['values'] .= ",'" . addslashes($value) . "'";
            }
        }
    } elseif ($do == 1) {
        //数据库操作
        for ($i = 1; $i < $count; $i++) {
            $f = $r[$i];
            if ($f == "special.field" || !strstr($emod_r[$modid]['caneditf'], ',' . $f . ',')) {
                continue;
            }
            $add[$f] = ReturnCheckboxAddF($add[$f], $modid, $f);
            //复选框
            $value = RepPhpAspJspcodeText($add[$f]);
            if ($f == 'newstime') {
                $value = empty($value) ? time() : to_time($value);
            } elseif ($f == "morepic") {
                $value = ReturnMorepicpath($add['msmallpic'], $add['mbigpic'], $add['mpicname'], $add['mdelpicid'], $add['mpicid'], $add, $add['mpicurl_qz'], 1);
            } elseif ($f == "downpath") {
                $value = ReturnDownpath($add['downname'], $add['downpath'], $add['delpathid'], $add['pathid'], $add['downuser'], $add['fen'], $add['thedownqz'], $add, $add['foruser'], $add['downurl_qz'], 1);
            } elseif ($f == "onlinepath") {
                $value = ReturnDownpath($add['odownname'], $add['odownpath'], $add['odelpathid'], $add['opathid'], $add['odownuser'], $add['ofen'], $add['othedownqz'], $add, $add['oforuser'], $add['onlineurl_qz'], 1);
            } elseif ($f == "smalltext") {
                if (!trim($value)) {
                    $value = SubSmalltextVal($add[newstext], $public_r[smalltextlen]);
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:101,代码来源:functions.php

示例9: GetAdJs

function GetAdJs($adid)
{
    global $empire, $public_r, $dbtbpre;
    $r = $empire->fetch1("select * from {$dbtbpre}enewsad where adid='{$adid}'");
    $file = "../../../d/js/acmsd/" . $public_r[adfile] . $adid . ".js";
    //到期
    if ($r['endtime'] != '0000-00-00' && time() > to_time($r['endtime'])) {
        $r[reptext] = ClearHtmlZs($r[reptext]);
        $h = addslashes(str_replace("\r\n", "", $r[reptext]));
        $html = "document.write(\"" . $h . "\")";
        WriteFiletext_n($file, $html);
        return '';
    }
    if ($r['ylink']) {
        $ad_url = $r['url'];
    } else {
        $ad_url = $public_r[newsurl] . "e/public/ClickAd?adid=" . $adid;
        //广告链接
    }
    //----------------------文字广告
    if ($r[t] == 1) {
        $r[titlefont] = $r[titlecolor] . ',' . $r[titlefont];
        $picurl = DoTitleFont($r[titlefont], $r[picurl]);
        //文字属性
        $h = "<a href='" . $ad_url . "' target=" . $r[target] . " title='" . $r[alt] . "'>" . addslashes($picurl) . "</a>";
        //普通显示
        if ($r[adtype] == 1) {
            $html = "document.write(\"" . $h . "\")";
        } else {
            $html = "document.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_dialog.js></script>\"); \ndocument.write(\"<div style='position:absolute;left:300px;top:150px;width:" . $r[pic_width] . "; height:" . $r[pic_height] . ";z-index:1;solid;filter:alpha(opacity=90)' id=DGbanner5 onmousedown='down1(this)' onmousemove='move()' onmouseup='down=false'><table cellpadding=0 border=0 cellspacing=1 width=" . $r[pic_width] . " height=" . $r[pic_height] . " bgcolor=#000000><tr><td height=18 bgcolor=#5A8ACE align=right style='cursor:move;'><a href=# style='font-size: 9pt; color: #eeeeee; text-decoration: none' onClick=clase('DGbanner5') >关闭>>><img border='0' src='" . $public_r[newsurl] . "d/js/acmsd/close_o.gif'></a>&nbsp;</td></tr><tr><td bgcolor=f4f4f4 >&nbsp;" . $h . "</td></tr></table></div>\");";
        }
    } elseif ($r[t] == 2) {
        $r[htmlcode] = ClearHtmlZs($r[htmlcode]);
        $h = addslashes(str_replace("\r\n", "", $r[htmlcode]));
        //普通显示
        if ($r[adtype] == 1) {
            $html = "document.write(\"" . $h . "\")";
        } else {
            $html = "document.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_dialog.js></script>\"); \ndocument.write(\"<div style='position:absolute;left:300px;top:150px;width:" . $r[pic_width] . "; height:" . $r[pic_height] . ";z-index:1;solid;filter:alpha(opacity=90)' id=DGbanner5 onmousedown='down1(this)' onmousemove='move()' onmouseup='down=false'><table cellpadding=0 border=0 cellspacing=1 width=" . $r[pic_width] . " height=" . $r[pic_height] . " bgcolor=#000000><tr><td height=18 bgcolor=#5A8ACE align=right style='cursor:move;'><a href=# style='font-size: 9pt; color: #eeeeee; text-decoration: none' onClick=clase('DGbanner5') >关闭>>><img border='0' src='" . $public_r[newsurl] . "d/js/acmsd/close_o.gif'></a>&nbsp;</td></tr><tr><td bgcolor=f4f4f4 >&nbsp;" . $h . "</td></tr></table></div>\");";
        }
    } elseif ($r[t] == 3) {
        //打开新窗口
        if ($r[adtype] == 8) {
            $html = "window.open('" . $r[url] . "');";
        } elseif ($r[adtype] == 9) {
            $html = "window.open('" . $r[url] . "','','width=" . $r[pic_width] . ",height=" . $r[pic_height] . ",scrollbars=yes');";
        } else {
            $html = "window.showModalDialog('" . $r[url] . "','','dialogWidth:" . $r[pic_width] . "px;dialogHeight:" . $r[pic_height] . "px;scroll:no;status:no;help:no');";
        }
    } else {
        $filetype = GetFiletype($r[picurl]);
        //flash
        if ($filetype == ".swf") {
            $h = "<object classid=\\\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\\" codebase=\\\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\\\" name=\\\"movie\\\" width=\\\"" . $r[pic_width] . "\\\" height=\\\"" . $r[pic_height] . "\\\" id=\\\"movie\\\"><param name=\\\"movie\\\" value=\\\"" . $r[picurl] . "\\\"><param name=\\\"quality\\\" value=\\\"high\\\"><param name=\\\"menu\\\" value=\\\"false\\\"><embed src=\\\"" . $r[picurl] . "\\\" width=\\\"" . $r[pic_width] . "\\\" height=\\\"" . $r[pic_height] . "\\\" quality=\\\"high\\\" pluginspage=\\\"http://www.macromedia.com/go/getflashplayer\\\" type=\\\"application/x-shockwave-flash\\\" id=\\\"movie\\\" name=\\\"movie\\\" menu=\\\"false\\\"></embed><PARAM NAME='wmode' VALUE='Opaque'></object>";
        } else {
            $h = "<a href='" . $ad_url . "' target=" . $r[target] . "><img src='" . $r[picurl] . "' border=0 width='" . $r[pic_width] . "' height='" . $r[pic_height] . "' alt='" . $r[alt] . "'></a>";
        }
        //普通显示
        if ($r[adtype] == 1) {
            $html = "document.write(\"" . $h . "\");";
        } elseif ($r[adtype] == 4) {
            $html = "ns4=(document.layers)?true:false;\nie4=(document.all)?true:false;\nif(ns4){document.write(\"<layer id=DGbanner2 width=" . $r[pic_width] . " height=" . $r[pic_height] . " onmouseover=stopme('DGbanner2') onmouseout=movechip('DGbanner2')>" . $h . "</layer>\");}\nelse{document.write(\"<div id=DGbanner2 style='position:absolute; width:" . $r[pic_width] . "px; height:" . $r[pic_height] . "px; z-index:9; filter: Alpha(Opacity=90)' onmouseover=stopme('DGbanner2') onmouseout=movechip('DGbanner2')>" . $h . "</div>\");}\ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_float_fullscreen.js></script>\");";
        } elseif ($r[adtype] == 5) {
            $html = "if (navigator.appName == 'Netscape')\n{document.write(\"<layer id=DGbanner3 top=150 width=" . $r[pic_width] . " height=" . $r[pic_height] . ">" . $h . "</layer>\");}\nelse{document.write(\"<div id=DGbanner3 style='position: absolute;width:" . $r[pic_height] . ";top:150;visibility: visible;z-index: 1'>" . $h . "</div>\");}\ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_float_upanddown.js></script>\");";
        } elseif ($r[adtype] == 6) {
            $html = "if(navigator.appName == 'Netscape')\n{document.write(\"<layer id=DGbanner10 top=150 width=" . $r[pic_width] . " height=" . $r[pic_height] . ">" . $h . "</layer>\");}\nelse{document.write(\"<div id=DGbanner10 style='position: absolute;width:" . $r[pic_width] . ";top:150;visibility: visible;z-index: 1'>" . $h . "</div>\");}\ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_float_upanddown_L.js></script>\");";
        } elseif ($r[adtype] == 7) {
            $html = "ns4=(document.layers)?true:false;\nif(ns4){document.write(\"<layer id=DGbanner4Cont onLoad='moveToAbsolute(layer1.pageX-160,layer1.pageY);clip.height=" . $r[pic_height] . ";clip.width=" . $r[pic_width] . "; visibility=show;'><layer id=DGbanner4News position:absolute; top:0; left:0>" . $h . "</layer></layer>\");}\nelse{document.write(\"<div id=DGbanner4 style='position:absolute;top:0; left:0;'><div id=DGbanner4Cont style='position:absolute;width:" . $r[pic_width] . ";height:" . $r[pic_height] . ";clip:rect(0," . $r[pic_width] . "," . $r[pic_height] . ",0)'><div id=DGbanner4News style='position:absolute;top:0;left:0;right:820'>" . $h . "</div></div></div>\");} \ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_fullscreen.js></script>\");";
        } elseif ($r[adtype] == 3) {
            $html = "document.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_dialog.js></script>\"); \ndocument.write(\"<div style='position:absolute;left:300px;top:150px;width:" . $r[pic_width] . "; height:" . $r[pic_height] . ";z-index:1;solid;filter:alpha(opacity=90)' id=DGbanner5 onmousedown='down1(this)' onmousemove='move()' onmouseup='down=false'><table cellpadding=0 border=0 cellspacing=1 width=" . $r[pic_width] . " height=" . $r[pic_height] . " bgcolor=#000000><tr><td height=18 bgcolor=#5A8ACE align=right style='cursor:move;'><a href=# style='font-size: 9pt; color: #eeeeee; text-decoration: none' onClick=clase('DGbanner5') >关闭>>><img border='0' src='" . $public_r[newsurl] . "d/js/acmsd/close_o.gif'></a>&nbsp;</td></tr><tr><td bgcolor=f4f4f4 >&nbsp;" . $h . "</td></tr></table></div>\");";
        } else {
            $html = "function closeAd(){huashuolayer2.style.visibility='hidden';huashuolayer3.style.visibility='hidden';}function winload(){huashuolayer2.style.top=109;huashuolayer2.style.left=5;huashuolayer3.style.top=109;huashuolayer3.style.right=5;}//if(document.body.offsetWidth>800){\n\t\t\t\t{document.write(\"<div id=huashuolayer2 style='position: absolute;visibility:visible;z-index:1'><table width=0  border=0 cellspacing=0 cellpadding=0><tr><td height=10 align=right bgcolor=666666><a href=javascript:closeAd()><img src=" . $public_r[newsurl] . "d/js/acmsd/close.gif width=12 height=10 border=0></a></td></tr><tr><td>" . $h . "</td></tr></table></div>\"+\"<div id=huashuolayer3 style='position: absolute;visibility:visible;z-index:1'><table width=0  border=0 cellspacing=0 cellpadding=0><tr><td height=10 align=right bgcolor=666666><a href=javascript:closeAd()><img src=" . $public_r[newsurl] . "d/js/acmsd/close.gif width=12 height=10 border=0></a></td></tr><tr><td>" . $h . "</td></tr></table></div>\");}winload()//}";
        }
    }
    WriteFiletext_n($file, $html);
}
开发者ID:novnan,项目名称:meiju,代码行数:76,代码来源:ListAd.php

示例10: detail

 protected function detail($pk)
 {
     $arr = $this->where(array('id' => $pk))->find('hy');
     return array('table' => array('table1' => array('title' => '通知公告', 'icon' => 'fa-volume-up', 'style' => 'red', 'value' => array('标        题:' => $arr['title'], '创建时间:' => to_time($arr['create_time']), '相关文件:' => $arr['file_id'] ? '<a href="' . file_down_url($arr['file_id']) . '">下载文件</a>' : "无")), 'table2' => array('title' => '公告内容', 'icon' => 'fa-file-text', 'style' => 'purple table2', 'cols' => '0,12', 'value' => array('' => $arr['content']))));
 }
开发者ID:homyit,项目名称:HyFrame,代码行数:5,代码来源:HyNoticeModel.class.php

示例11: admin_ClearMember

function admin_ClearMember($add, $logininid, $loginin)
{
    global $empire, $user_tablename, $user_username, $user_userid, $dbtbpre, $level_r, $user_group, $user_email, $user_checked, $user_registertime, $user_register, $user_group, $user_userfen, $user_money;
    CheckLevel($logininid, $loginin, $classid, "member");
    //验证权限
    //变量处理
    $username = RepPostVar($add['username']);
    $email = RepPostStr($add['email']);
    $startuserid = (int) $add['startuserid'];
    $enduserid = (int) $add['enduserid'];
    $groupid = (int) $add['groupid'];
    $startregtime = RepPostVar($add['startregtime']);
    $endregtime = RepPostVar($add['endregtime']);
    $startuserfen = (int) $add['startuserfen'];
    $enduserfen = (int) $add['enduserfen'];
    $startmoney = (int) $add['startmoney'];
    $endmoney = (int) $add['endmoney'];
    $checked = (int) $add['checked'];
    $where = '';
    if ($username) {
        $where .= " and " . $user_username . " like '%{$username}%'";
    }
    if ($email) {
        $where .= " and " . $user_email . " like '%{$email}%'";
    }
    if ($enduserid) {
        $where .= ' and ' . $user_userid . ' BETWEEN ' . $startuserid . ' and ' . $enduserid;
    }
    if ($groupid) {
        $where .= " and " . $user_group . "='{$groupid}'";
    }
    if ($startregtime && $endregtime) {
        if ($user_register) {
            $startregtime = to_time($startregtime);
            $endregtime = to_time($endregtime);
        }
        $where .= " and " . $user_registertime . ">='{$startregtime}' and " . $user_registertime . "<='{$endregtime}'";
    }
    if ($enduserfen) {
        $where .= ' and ' . $user_userfen . ' BETWEEN ' . $startuserfen . ' and ' . $enduserfen;
    }
    if ($endmoney) {
        $where .= ' and ' . $user_money . ' BETWEEN ' . $startmoney . ' and ' . $endmoney;
    }
    if ($checked) {
        $checkval = $checked == 1 ? 1 : 0;
        $where .= " and " . $user_checked . "='{$checkval}'";
    }
    if (!$where) {
        printerror("EmptyClearMember", "history.go(-1)");
    }
    $where = substr($where, 5);
    $sql = $empire->query("select " . $user_userid . "," . $user_username . "," . $user_group . " from " . $user_tablename . " where " . $where);
    $dh = '';
    $inid = '';
    while ($r = $empire->fetch($sql)) {
        $euid = $r[$user_userid];
        //删除短信息
        $dousername = doUtfAndGbk($r[$user_username], 1);
        //删除附加表
        $fid = GetMemberFormId($r[$user_group]);
        DoDelMemberF($fid, $euid, $dousername);
        $empire->query("delete from {$dbtbpre}enewsqmsg where to_username='" . $dousername . "'");
        //集合
        $inid .= $dh . $euid;
        $dh = ',';
    }
    if ($inid) {
        $addw = $user_userid . " in (" . $inid . ")";
        $addaw = "userid in (" . $inid . ")";
        $sql = $empire->query("delete from " . $user_tablename . " where " . $addw);
        //删除收藏
        $del = $empire->query("delete from {$dbtbpre}enewsfava where " . $addaw);
        $del = $empire->query("delete from {$dbtbpre}enewsfavaclass where " . $addaw);
        //删除购买记录
        $del = $empire->query("delete from {$dbtbpre}enewsbuybak where " . $addaw);
        //删除下载记录
        $del = $empire->query("delete from {$dbtbpre}enewsdownrecord where " . $addaw);
        //删除好友记录
        $del = $empire->query("delete from {$dbtbpre}enewshy where " . $addaw);
        $del = $empire->query("delete from {$dbtbpre}enewshyclass where " . $addaw);
        //删除留言
        $del = $empire->query("delete from {$dbtbpre}enewsmembergbook where " . $addaw);
        //删除反馈
        $del = $empire->query("delete from {$dbtbpre}enewsmemberfeedback where " . $addaw);
    }
    insert_dolog("");
    //操作日志
    printerror("DelMemberSuccess", "ClearMember.php");
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:90,代码来源:ClearMember.php

示例12: sys_TotalData

function sys_TotalData($classid, $enews = 0, $day = 0)
{
    global $empire, $class_r, $class_zr, $dbtbpre, $fun_r;
    if (empty($classid)) {
        return "";
    }
    if ($day) {
        if ($day == 1) {
            $date = date("Y-m-d");
            $starttime = $date . " 00:00:01";
            $endtime = $date . " 23:59:59";
        } elseif ($day == 2) {
            $date = date("Y-m");
            $starttime = $date . "-01 00:00:01";
            $endtime = $date . "-" . date("t") . " 23:59:59";
        } elseif ($day == 3) {
            $date = date("Y");
            $starttime = $date . "-01-01 00:00:01";
            $endtime = $date + 1 . "-01-01 00:00:01";
        }
        $and = " and newstime>=" . to_time($starttime) . " and newstime<=" . to_time($endtime);
    }
    //统计专题
    if ($enews == 1) {
        if (empty($class_zr[$classid][tbname])) {
            echo $fun_r['BqErrorZid'] . "=<b>" . $classid . "</b>" . $fun_r['BqErrorNtb'];
            return "";
        }
        $query = "select count(*) as total from {$dbtbpre}ecms_" . $class_zr[$classid][tbname] . " where ztid like '%|" . $classid . "|%' and checked=1" . $and;
    } elseif ($enews == 2) {
        $query = "select count(*) as total from {$dbtbpre}ecms_" . $classid . " where checked=1" . $and;
    } else {
        if (empty($class_r[$classid][tbname])) {
            echo $fun_r['BqErrorCid'] . "=<b>" . $classid . "</b>" . $fun_r['BqErrorNtb'];
            return "";
        }
        if ($class_r[$classid][islast]) {
            $where = "classid='{$classid}'";
        } else {
            $where = ReturnClass($class_r[$classid][sonclass]);
        }
        $query = "select count(*) as total from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where " . $where . " and checked=1" . $and;
    }
    $num = $empire->gettotal($query);
    echo $num;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:46,代码来源:t_functions.php

示例13: printerror

        printerror("ErrorUrl", "history.go(-1)");
    }
    //未审核
    $query = "select count(*) as total from {$dbtbpre}ecms_" . $class_zr[$ztid][tbname] . " where checked=0 and ztid like '%|{$ztid}|%'";
    //已审核
    $query1 = "select count(*) as total from {$dbtbpre}ecms_" . $class_zr[$ztid][tbname] . " where checked=1 and ztid like '%|{$ztid}|%'";
    //点击
    $onclickquery = "select avg(onclick) as total from {$dbtbpre}ecms_" . $class_zr[$ztid][tbname] . " where 1=1 and ztid like '%|{$ztid}|%'";
} else {
    printerror("ErrorUrl", "history.go(-1)");
}
//时间
if ($startday && $endday) {
    $start = $startday . " 00:00:00";
    $end = $endday . " 23:59:59";
    $timeadd = " and (newstime>='" . to_time($start) . "' and newstime<='" . to_time($end) . "')";
    $query .= $timeadd;
    $query1 .= $timeadd;
    $onclickquery .= $timeadd;
}
//用户
if ($userid) {
    $useradd = " and userid='{$userid}'";
    $query .= $useradd;
    $query1 .= $useradd;
    $onclickquery .= $useradd;
}
//数据表
$htb = 0;
$tbsql = $empire->query("select tbname,tname from {$dbtbpre}enewstable order by tid");
while ($tbr = $empire->fetch($tbsql)) {
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:TotalData.php

示例14: EditSpInfoTime

function EditSpInfoTime($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $spid = (int) $add[spid];
    $sid = $add[sid];
    $newstime = $add[newstime];
    if (!$spid) {
        printerror('ErrorUrl', '');
    }
    $count = count($sid);
    if (!$count) {
        printerror('EmptySpInfoTime', '');
    }
    //验证
    $spr = CheckSpInfoLevel($spid);
    if ($spr[sptype] == 1) {
        for ($i = 0; $i < $count; $i++) {
            $dosid = (int) $sid[$i];
            $donewstime = $newstime[$i] ? to_time($newstime[$i]) : time();
            $empire->query("update {$dbtbpre}enewssp_1 set newstime='{$donewstime}' where sid='{$dosid}' and spid='{$spid}'");
        }
    } elseif ($spr[sptype] == 2) {
        for ($i = 0; $i < $count; $i++) {
            $dosid = (int) $sid[$i];
            $donewstime = $newstime[$i] ? to_time($newstime[$i]) : time();
            $empire->query("update {$dbtbpre}enewssp_2 set newstime='{$donewstime}' where sid='{$dosid}' and spid='{$spid}'");
        }
    } else {
        printerror('ErrorUrl', '');
    }
    //操作日志
    insert_dolog("spid={$spid}");
    printerror("EditSpInfoTimeSuccess", "ListSpInfo.php?spid={$spid}");
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:34,代码来源:ListSpInfo.php

示例15: TogZt

function TogZt($add, $userid, $username)
{
    global $empire, $class_r, $dbtbpre;
    $ztid = (int) $add['ztid'];
    if (empty($ztid)) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    $r = $empire->fetch1("select ztid,ztname,tbname from {$dbtbpre}enewszt where ztid={$ztid}");
    if (empty($r['ztid']) || empty($r['tbname'])) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    $wheresql = "";
    $formvar = "";
    //关键字
    $keyboard = RepPostVar2($add['keyboard']);
    if ($keyboard) {
        $formvar .= ReturnFormHidden('keyboard', $add['keyboard']);
        $searchfsql = '';
        if ($add['stitle']) {
            $searchfsql .= "title like '%{$keyboard}%'";
            $formvar .= ReturnFormHidden('stitle', $add['stitle']);
        }
        if ($add['susername']) {
            if ($searchfsql) {
                $or = " or ";
            }
            $searchfsql .= $or . "username like '%{$keyboard}%'";
            $formvar .= ReturnFormHidden('susername', $add['susername']);
        }
        if ($add['snewstext']) {
            $or = "";
            if ($searchfsql) {
                $or = " or ";
            }
            $searchfsql .= $or . "newstext like '%{$keyboard}%'";
            $formvar .= ReturnFormHidden('snewstext', $add['snewstext']);
        }
        if ($searchfsql) {
            $wheresql = " and (" . $searchfsql . ")";
        }
    }
    //是否推荐
    if ($add['isgood']) {
        $wheresql .= " and isgood>0";
        $formvar .= ReturnFormHidden('isgood', $add['isgood']);
    }
    //头条
    if ($add['firsttitle']) {
        $wheresql .= " and firsttitle>0";
        $formvar .= ReturnFormHidden('firsttitle', $add['firsttitle']);
    }
    //有标题图片
    if ($add['titlepic']) {
        $wheresql .= " and ispic=1";
        $formvar .= ReturnFormHidden('titlepic', $add['titlepic']);
    }
    //审核
    if ($add['checked']) {
        $wheresql .= " and checked=1";
        $formvar .= ReturnFormHidden('checked', $add['checked']);
    }
    //按栏目刷新
    $classid = (int) $add['classid'];
    if ($classid) {
        $formvar .= ReturnFormHidden('classid', $add['classid']);
        //大栏目
        if (empty($class_r[$classid][islast])) {
            $where = ReturnClass($class_r[$classid][sonclass]);
        } else {
            $where = "classid='{$classid}'";
        }
        $wheresql .= " and (" . $where . ")";
    }
    $startid = (int) $add[startid];
    $endid = (int) $add[endid];
    $startday = RepPostVar($add[startday]);
    $endday = RepPostVar($add[endday]);
    $formvar .= ReturnFormHidden('retype', $add['retype']);
    //按ID
    if ($add['retype']) {
        if ($endid) {
            $wheresql .= " and id>={$startid} and id<={$endid}";
            $formvar .= ReturnFormHidden('startid', $add[startid]) . ReturnFormHidden('endid', $add[endid]);
        }
    } else {
        if ($startday && $endday) {
            $wheresql .= " and truetime>=" . to_time($startday . " 00:00:00") . " and truetime<=" . to_time($endday . " 23:59:59");
            $formvar .= ReturnFormHidden('startday', $add[startday]) . ReturnFormHidden('endday', $add[endday]);
        }
    }
    //附件sql条件
    $query = $add['query'];
    if ($query) {
        $query = ClearAddsData($query);
        //去除adds
        $wheresql .= " and (" . $query . ")";
        $formvar .= ReturnFormHidden('query', $add['query']);
    }
    $wheresql = " where ztid not like '%|" . $ztid . "|%'" . $wheresql;
    $owheresql = $wheresql . " and ztid=''";
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:101,代码来源:classfun.php


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