<th class="td27">结束时间:</th> <td class="vtop rowform"><input type="text" class="txt" name="endtime" value="<?php echo $rs['endtime'] ? _getdate('Y-m-d H:i', $rs['endtime']) : ''; ?> " /></td> <td class="vtop tips2">时间格式为 2014-04-20 12:34</td> <td> </td> </tr> <?php if ($rs['addtime']) { ?> <tr> <td> </td> <th class="td27">添加时间:</th> <td class="vtop rowform"><?php echo _getdate('Y-m-d H:i:s', $rs['addtime']); ?> </td> <td class="vtop tips2"> </td> <td> </td> </tr> <?php } ?> <tr> <td> </td> <th class="td27">录入人员:</th> <td class="vtop rowform"><input type="text" class="txt" name="author" value="<?php if ($id) { echo $rs['author']; } else {
} $datas = $DreamCMS->db->get_results("SELECT * FROM `#DC@__wordcup_livelist` " . $sql . $sqlorder . $limit); if ($datas && is_array($datas)) { $str = ''; foreach ($datas as $key => $val) { $h1class = ''; $class = $key % 2 == 1 ? " class='bgca' " : ''; $str .= "<li " . $class . " ><a href='javascript:;' onClick=tiaoUrl('" . $val['id'] . "','wordcup_livelist')>"; $str .= "<p class='imgs'>"; if ($val['starttime'] <= $nowtime && $val['endtime'] >= $nowtime) { //正在播放 $str .= "<img src='/templates/default/images/sjbs_09.png'/>"; $h1class = " class='h1cr' "; } $str .= "</p>"; $str .= "<h1 " . $h1class . ">" . _getdate('m月d日 H:i', $val['starttime']) . "</h1>"; $str .= "<p class='listtitle'>"; if ($val['sortname']) { $str .= $val['sortname'] . " "; } if ($val['title']) { $str .= $val['title']; } $str .= "</p>"; $str .= "</a></li>"; } $return['cons'] = $str; $return['pan'] = 1; //存在 } else { $return['pan'] = 2;
<tr class="nobg"> <td colspan="2" class="td27">最后登陆IP:</td> </tr> <tr> <td class="vtop rowform"><input type="text" disabled class="txt" value="<?php echo $rs->lastip; ?> " readonly="true"/></td> <td class="vtop tips2"></td> </tr> <tr class="nobg"> <td colspan="2" class="td27">最后登陆时间:</td> </tr> <tr> <td class="vtop rowform"><input type="text" disabled class="txt" value="<?php echo _getdate("Y-m-d H:i:s", $rs->lastlogintime); ?> " readonly="true"/></td> <td class="vtop tips2"></td> </tr> <tr> <td colspan="2" class="td27">以下资料选填</td> </tr> <tr class="nobg"> <td colspan="2" class="td27">昵称:</td> </tr> <tr> <td class="vtop rowform"><input name="nickname" type="text" id="nickname" value="<?php echo $rs->info['nickname']; ?> " maxlength="12" class="txt"/> </td>
?> "><?php echo $rs[$i]['username']; ?> </a><?php } else { echo $rs[$i]['username']; } ?> [<?php echo $rs[$i]['ip']; ?> ]</th> <th width="47">时间:</th> <th width="390"><?php echo _getdate("Y-m-d H:i:s", $rs[$i]['addtime']); ?> </th> </tr> <tr> <td>评论:</td> <td colspan="4"><?php echo $rs[$i]['contents']; ?> <?php if ($rs[$i]['reply']) { ?> <blockquote style="background-color:#F7F7F7;border:#E5E5E5 solid 1px; padding:4px;"> <?php
</select> <input type="submit" class="btn" name="advsubmit" value="提交" /> </div></td> </tr> </table> </form> </div> </body> </html> <?php break; case 'add': $id = intval($_GET['advid']); $rs = $DreamCMS->db->get_row("SELECT * FROM `#DC@__advertise` where id='{$id}'", ARRAY_A); $rs['starttime'] = _getdate("Y-m-d", $rs['starttime']); $rs['endtime'] = empty($rs['endtime']) ? '' : _getdate("Y-m-d", $rs['endtime']); $adv = stripslashes_deep(unserialize($rs['code'])); empty($adv) && ($adv = array()); empty($rs['style']) && ($rs['style'] = 'code'); da_admin_head(); ?> <div id="append_parent"></div> <div class="container" id="cpcontainer"> <script type="text/JavaScript">admincpnav('首页 » 广告管理 » <?php echo empty($id) ? '添加' : '修改'; ?> 广告','<a href="admincp.php?action=misc&operation=custommenu&do=add&title=cplog_advertisements&url=action%3Dadvertisements" target="main"><img src="admin/images/btn_add2menu.gif" title="添加常用操作" width="19" height="18" /></a>');</script> <div class="itemtitle"> <h3> <?php echo empty($id) ? '添加' : '修改';
</td> <td class="vtop td24 lineheight">服务器端口</td> <td class="lineheight smallfont"><?php echo getenv(SERVER_PORT); ?> </td> </tr> <tr> <td class="vtop td24 lineheight">服务器剩余空间</td> <td class="lineheight smallfont"><?php echo intval(diskfreespace(".") / (1024 * 1024)) . "M"; ?> </td> <td class="vtop td24 lineheight">服务器时间</td> <td class="lineheight smallfont"><?php echo _getdate("Y年n月j日H点i分s秒"); ?> </td> </tr> <tr> <td class="vtop td24 lineheight">WEB服务器版本</td> <td class="lineheight smallfont"><?php echo $_SERVER['SERVER_SOFTWARE']; ?> </td> <td class="vtop td24 lineheight">服务器语种</td> <td class="lineheight smallfont"><?php echo getenv("HTTP_ACCEPT_LANGUAGE"); ?> </td> </tr>
echo $path; ?> </li> <li>文件类型:<?php echo FileName2Pic($rs->filename); ?> .<?php echo $rs->ext; ?> </li> <li>保存方式:<?php echo $rs->type == "remote" ? "远程" : "本地上传"; ?> </li> <li>保存时间:<?php echo _getdate('Y-m-d H:i:s', $rs->time); ?> </li> </ul></td> </tr> </table> <table class="tb tb2 " width="100%"> <tr> <form action="admincp.php?do=file&operation=post" method="post" enctype="multipart/form-data" name="uploadfile" target="post" id="uploadfile"> <td style="width:60px;">重新上传:</td> <td class="vtop rowform"><input name="file" type="file" class="uploadbtn" id="pic" /><input name="fid" type="hidden" value="<?php echo $fid; ?> " /><input name="action" type="hidden" value="reupload" /> <input type="submit" value="上传" style="border:1px solid #999999;"/></td> </form> </tr>
$aaa = $_GET['aaa']; $rows = $_GET['rows']; !$tabledb && !$tablesel && alert('没有选择操作对象'); !$tabledb && ($tabledb = explode("|", $tablesel)); !$step && ($sizelimit /= 2); $bakupdata = bakupdata($tabledb, $start); if (!$step) { !$tabledb && alert('没有选择操作对象'); $tablesel = implode("|", $tabledb); $step = 1; $aaa = num_rand(10); $start = 0; $bakuptable = bakuptable($tabledb); } $f_num = ceil($step / 2); $filename = 'DreamCMS_' . _getdate("md") . '_' . $aaa . '_' . $f_num . '.sql'; $step++; $writedata = $bakuptable ? $bakuptable . $bakupdata : $bakupdata; $t_name = $tabledb[$tableid - 1]; $c_n = $startfrom; if ($stop == 1) { $files = $step - 1; trim($writedata) && writefile(DCPATH . 'admin/data/' . $filename, $bak . $writedata, 'ab'); redirect("正在备份数据库表{$t_name}: 共{$rows}条记录<br>已经备份至{$c_n}条记录,已生成{$f_num}个备份文件,<br>程序将自动备份余下部分", "admincp.php?do=database&operation=savebackup&start={$startfrom}&tableid={$tableid}&sizelimit={$sizelimit}&step={$step}&aaa={$aaa}&tablesel={$tablesel}&rows={$rows}", 3); } else { trim($writedata) && writefile(DCPATH . 'admin/data/' . $filename, $bak . $writedata, 'ab'); if ($step > 1) { for ($i = 1; $i <= $f_num; $i++) { $temp = substr($filename, 0, 19) . $i . ".sql"; if (file_exists("data/{$temp}")) { $bakfile .= '<a href="' . "data/{$temp}" . '">' . $temp . '</a><br>';
function MakeArticleHtm($aid = '', $p = '1') { global $DreamCMS; if (!$DreamCMS->config['ishtm'] || empty($aid)) { return false; } $DreamCMS->mode = 'CreateHtml'; //$htmldate=$DreamCMS->Show($aid,$p); //原 $htmldate = $DreamCMS->Show($aid, $p, 1); //zhaoyanmin 更新静态页和添加静态页时有跳转地址防止跳转 //$body=explode('<div style="page-break-after: always"><span style="display: none"> </span></div>',$DreamCMS->result->body); $body = explode('<div style="page-break-after: always;"><span style="DISPLAY:none"> </span></div>', $DreamCMS->result->body); //zhaoyanmin 内容分页 $total = count($body); if ($DreamCMS->config['htmdircreaterule'] == '0') { $FDir = $DreamCMS->result->catalogdir; } elseif ($DreamCMS->config['htmdircreaterule'] == '1') { $FDir = _getdate('Y-m-d'); } elseif ($DreamCMS->config['htmdircreaterule'] == '2') { $FDir = str_replace(array('Y', 'y', 'm', 'n', 'd', 'j', 'C'), array(_getdate('Y'), _getdate('y'), _getdate('m'), _getdate('n'), _getdate('d'), _getdate('j'), $DreamCMS->result->catalogdir), $DreamCMS->config['customhtmdircreaterule']); } else { $FDir = _getdate('Ymd'); } $ODir = substr($DreamCMS->result->filename, 0, strrpos($DreamCMS->result->filename, '/')); $_Dir = $ODir == $FDir ? $ODir : $FDir; $RootDir = DCPATH . $DreamCMS->config['htmdir'] . $_Dir; createdir($RootDir); switch ($DreamCMS->config['htmnamerule']) { case "0": $filename = $DreamCMS->result->id; break; case "pinyin": $filename = $DreamCMS->result->customlink; break; case "pubdate": $filename = $DreamCMS->result->pubdate; break; default: $filename = $DreamCMS->result->id; } $NewFileName = $_Dir . '/' . $filename; $total > 1 && $p != 1 && ($filename .= '_' . $p); $FilePath = $RootDir . "/{$filename}" . $DreamCMS->config['htmlext']; if ($NewFileName == $DreamCMS->result->filename) { writefile($FilePath, $htmldate); } else { delfile(DCPATH . $DreamCMS->config['htmdir'] . $DreamCMS->result->filename . $DreamCMS->config['htmlext']); if ($total > 1) { for ($i = 1; $i <= $total; $i++) { delfile(DCPATH . $DreamCMS->config['htmdir'] . $DreamCMS->result->filename . '_' . $i . $DreamCMS->config['htmlext']); } } writefile($FilePath, $htmldate); } $total > 1 && $p < $total && MakeArticleHtm($aid, $p + 1); $DreamCMS->db->query("UPDATE `#DC@__article` SET `filename` = '{$NewFileName}' WHERE `id` ='{$aid}'"); return true; }
function remote(&$content, $one = false) { global $DreamCMS, $title; $content = stripslashes($content); $img = array(); preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\\/\\/(.*)\\.(gif|jpg|jpeg|bmp|png))/isU", $content, $img); $_array = array_unique($img[2]); foreach ($_array as $_k => $imgurl) { if (strstr(strtolower($imgurl), $DreamCMS->config['url'])) { unset($_array[$_k]); } } set_time_limit(0); $UploadDir = $DreamCMS->config['uploadfiledir'] . "/"; $RelativePath = $DreamCMS->dir . $UploadDir; //相对路径 $RootPath = DCPATH . $UploadDir; //绝对路径 switch ($DreamCMS->config['savedir']) { case "0": $_CreateDir = ""; break; //全部保存在一起 //全部保存在一起 case 'ym': $_CreateDir = _getdate("Ym") . "/"; break; //按年月 //按年月 case 'ymd': $_CreateDir = _getdate("Ymd") . "/"; break; //按年月日 //按年月日 case 'ext': $_CreateDir = $FileExt . "/"; break; //按文件类型 } $RelativePath = $RelativePath . $_CreateDir; $RootPath = $RootPath . $_CreateDir; $milliSecond = 'remote_' . _getdate("YmdHis") . rand(1, 99999); createdir($RootPath); foreach ($_array as $key => $value) { $value = trim($value); preg_match("/\\.([a-zA-Z0-9]{2,4})\$/", $value, $exts); $FileExt = strtolower($exts[1]); //ļʽ CheckValidExt($FileExt); //判断文件类型 //过滤文件; strstr($FileExt, 'ph') && ($FileExt = "phpfile"); in_array($FileExt, array('cer', 'htr', 'cdx', 'asa', 'asp', 'jsp', 'aspx', 'cgi')) && ($FileExt .= "file"); $sFileName = $milliSecond . $key . "." . $FileExt; $RootPath_FileName = $RootPath . $sFileName; $RelativePath_FileName = $RelativePath . $sFileName; $get_file = fopen_url($value); $get_file && writefile($RootPath_FileName, $get_file); if (in_array($FileExt, array('gif', 'jpg', 'png')) && $DreamCMS->config['isthumb'] && ($DreamCMS->config['thumbwidth'] || $DreamCMS->config['thumbhight'])) { list($width, $height, $imagetype) = GetImageSize($RootPath_FileName); if ($width > $DreamCMS->config['thumbwidth'] || $height > $DreamCMS->config['thumbhight']) { createdir($RootPath . "thumb"); } $Thumbnail = MakeThumbnail($RootPath, $RootPath_FileName, $milliSecond . $key); if (!empty($Thumbnail['filepath'])) { $SmallImagePath_FileName = str_replace($RootPath, $RelativePath, $Thumbnail['filepath']); imageWaterMark($Thumbnail['filepath']); } imageWaterMark($RootPath_FileName); } else { $SmallImagePathFile = ''; } $_FileSize = @filesize($RootPath_FileName); $RelativePath_FileName = str_replace($DreamCMS->dir . $UploadDir, $UploadDir, $RelativePath_FileName); $SmallImagePath_FileName = str_replace($DreamCMS->dir . $UploadDir, $UploadDir, $SmallImagePath_FileName); $DreamCMS->db->query("INSERT INTO `#DC@__file` (`filename`,`ofilename`,`path`,`thumbpath`,`intro`,`ext`,`size` ,`time`,`type`) VALUES ('{$sFileName}', '{$value}', '{$RelativePath_FileName}','{$SmallImagePath_FileName}', '{$title}', '{$FileExt}', '{$_FileSize}', '" . time() . "', 'remote') "); $content = str_replace($value, $DreamCMS->dir . $RelativePath_FileName, $content); if ($one && $key == 0) { break; } } $content = add_magic_quotes($content); }
m:有前导零01-12,n:没前导零1-12<br /> d:有前导零01-31,j:没前导零1-31<br />注:请不要频繁更换文章生成文件夹创建规则和文章生成文件命名规则</td> <td class="vtop tips2"> </td> </tr> <tr class="nobg"> <td class="td27">文章生成文件命名规则:</td> <td class="td27"> </td> <td class="td27"> </td> </tr> <tr> <td class="vtop rowform"><ul onmouseover="altStyle(this);"> <li style="clear:both"> <input class="radio" type="radio" name="htmnamerule" value="0" /> 默认[文章ID.html] </li> <li style="clear:both"> <input class="radio" type="radio" name="htmnamerule" value="pinyin" /> 文章标题拼音/自定义链接 [biaoti.html] </li> <li style="clear:both"> <input class="radio" type="radio" name="htmnamerule" value="pubdate" /> 发布时间[ <?php echo _getdate('mdHis'); ?> .html] </li> </ul></td> <td class="vtop tips2"> </td> <td class="vtop tips2"> </td> </tr> <tr class="nobg"> <td class="td27">独立页面生成方式:</td> <td class="td27"> </td> <td class="td27"> </td> </tr> <tr> <td class="vtop rowform"><ul onmouseover="altStyle(this);"> <li style="clear:both"> <input class="radio" type="radio" name="pagerule" value="dir" /> 目录 [/page/index.html] </li>
&in=<?php echo $in; ?> &type=other"><span>其它文件</span></a></li> </ul> </div> <table class="tb tb2 " width="100%"> <tr> <th></th> <th>文件名</th> <th>文件大小</th> <th>上传时间</th> </tr> <?php for ($i = 0; $i < $_count; $i++) { $rs[$i]['time'] = _getdate("Y-m-d H:i", $rs[$i]['time']); $rs[$i]['size'] = GetFileSize($rs[$i]['size']); $rs[$i]['icon'] = FileName2Pic($rs[$i]['filename']); ?> <tr> <td><?php echo $total - ($i + $firstcount); ?> </td> <td><?php echo $rs[$i]['icon']; ?> <?php echo $rs[$i]['filename']; ?>
</tr> <tr> <th> </th> <th>QQ/MSN:</th> <th><?php echo empty($rs[$i]['user']['m']) ? '' : $rs[$i]['user']['m']; ?> </th> <th>IP:</th> <th><?php echo $rs[$i]['ip']; ?> </th> <th>时间:</th> <th><?php echo _getdate("Y年m月d日 H时i分s秒", $rs[$i]['addtime']); ?> </th> </tr> <tr> <td>留言:</td> <td colspan="6"><?php echo $rs[$i]['text']; ?> <?php if ($rs[$i]['reply']) { ?> <blockquote style="background-color:#F7F7F7;border:#E5E5E5 solid 1px; padding:4px;"> <?php
echo $rs[$i]['name']; ?> " size="15" /></td> <td><a href="article.php?visible=1&tag=<?php echo rawurlencode($rs[$i]['name']); ?> "><?php echo $rs[$i]['count']; ?> </a></td> <td><?php echo _getdate("Y-m-d H:i:s", $rs[$i]['addtime']); ?> </td> <td><?php echo _getdate("Y-m-d H:i:s", $rs[$i]['updatetime']); ?> </td> <td><a href="admincp.php?do=tag&operation=del&id=<?php echo $rs[$i]['id']; ?> "onClick="return confirm('确定要删除?');">删除 </a>| <?php if ($rs[$i]['visible']) { ?> <a href="admincp.php?do=tag&operation=disabled&id=<?php echo $rs[$i]['id']; ?> " title='点击禁用此TAG'>禁用</a><?php } else { ?> <a href="admincp.php?do=tag&operation=open&id=<?php