} } //生成HTML UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); if ($cfg_remote_site == 'Y' && $isremote == "1") { if ($serviterm != "") { list($servurl, $servuser, $servpwd) = explode(',', $serviterm); $config = array('hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd, 'debug' => 'TRUE'); } else { $config = array(); } if (!$ftp->connect($config)) { exit('Error:None FTP Connection!'); } } $artUrl = MakeArt($id, true, true, $isremote); if ($artUrl == '') { $artUrl = $cfg_phpurl . "/view.php?aid={$id}"; } ClearMyAddon($id, $title); //返回成功信息 $msg = "\r\n 请选择你的后续操作:\r\n <a href='article_add.php?cid={$typeid}'><u>发布新文章</u></a>\r\n \r\n <a href='archives_do.php?aid=" . $id . "&dopost=editArchives'><u>查看更改</u></a>\r\n \r\n <a href='{$artUrl}' target='_blank'><u>查看文章</u></a>\r\n \r\n <a href='catalog_do.php?cid={$typeid}&dopost=listArchives'><u>管理文章</u></a>\r\n \r\n {$backurl}\r\n "; $wintitle = "成功更改文章!"; $wecome_info = "文章管理::更改文章"; $win = new OxWindow(); $win->AddTitle("成功更改文章:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand", " ", false); $win->Display(); } }
function GotoStaMsg($msg) { global $wintitle, $wecome_info, $winform; $wintitle = "导入内容模型规则"; $wecome_info = "<a href='mychannel_main.php'>内容模型管理</a>::导入内容模型规则"; $win = new OxWindow(); $win->Init(); $win->AddTitle("操作状态提示:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand"); $win->Display(); exit; }
/** * 显示一个不带表单的普通提示 * * @access public * @param string $msg 消息提示信息 * @param string $title 提示标题 * @return string */ function ShowMsgWin($msg, $title) { $win = new OxWindow(); $win->Init(); $win->mainTitle = "Oceanforex系统提示:"; $win->AddTitle($title); $win->AddMsgItem("<div style='padding-left:20px;line-height:150%'>{$msg}</div>"); $winform = $win->GetWindow("hand"); $win->Display(); }
function ShowMsgWin($msg, $title) { $win = new OxWindow(); $win->AddTitle($title); $win->AddMsgItem("<div style='padding-left:20px;line-height:150%'>{$msg}</div>"); $winform = $win->GetWindow("hand", " ", false); $win->Display(); }
/** * caijixia for dedecms * @version $Id: cjx.class.php 112 2013-05-28 01:22:57Z qinjinpeng $ * @copyright Copyright (c) 2011,caijixia for dedecms,caijixia.com. * @license This is NOT a freeware, use is subject to license terms * * @param NULL * @return NULL */ function ac_testregx() { global $cfg_soft_lang; $data = stripslashes($this->GV('data')); if ($cfg_soft_lang != 'utf-8') { $data = utf82gb($data); } require_once DEDEINC . '/dedetag.class.php'; $this->dtp = new DedeTagParse(); $this->dtp->LoadString($data); foreach ($this->dtp->CTags as $ctag) { $itemName = $ctag->TagName; ${$itemName} = trim($ctag->InnerText); } if (empty($list) || empty($page) || $list == 'http://' || $page == 'http://') { exit('规则错误'); } $listarr = array(); if (preg_match("/\\[([0-9]*-[0-9]*)\\]/", $list, $out)) { list($min, $max) = explode('-', $out[1]); if ($max - $min > 10) { $max = $min + 9; } for ($i = $min; $i <= $max; $i++) { $listarr[] = preg_replace("/\\[([0-9]*-[0-9]*)\\]/", $i, $list); } $list = preg_replace("/\\[([0-9]*-[0-9]*)\\]/", $min, $list); } else { $listarr[] = $list; } $str = $this->downfile($list); if ($cfg_soft_lang != $charset) { if ($charset == 'utf-8') { $str = utf82gb($str); } else { $str = gb2utf8($str); } } $page = str_replace('(*)', '###', $page); $page = preg_quote($page, '/'); $page = str_replace('###', '([0-9a-zA-Z\\.\\-\\/_]*)', $page); $dhtml = new DedeHtml2(); $dhtml->SetSource($str, $list, 'link'); $lss = array(); $i = 0; foreach ($dhtml->Links as $s) { if (preg_match('/' . $page . '/iU', $s['link'])) { if (!isset($lss[$s['link']])) { if (!isset($first)) { $first = $s['link']; } $lss[$s['link']] = $s['link']; $i++; if ($i == 10) { break; } } } } $msg = ''; $GLOBALS['wintitle'] = "采集侠-测试定向采集规则"; $GLOBALS['wecome_info'] = "采集侠定向采集::采集规则测试"; $win = new OxWindow(); $win->AddTitle('匹配到的列表地址(前10个)'); foreach ($listarr as $v) { $msg .= $v . "<br>"; } $win->AddMsgItem($msg); $win->AddTitle('第一个列表页匹配到的文章地址(前10个)'); $msg = ''; foreach ($lss as $v) { $msg .= $v . "<br>"; } $win->AddMsgItem($msg); $str = $this->downfile($first); if ($cfg_soft_lang != $charset) { if ($charset == 'utf-8') { $str = utf82gb($str); } else { $str = gb2utf8($str); } } $win->AddTitle("<font color=black>测试采集第一篇文章:{$first} </font>"); $win->AddTitle('文章标题'); if (empty($titlerule)) { $win->AddMsgItem('自动规则不需要测试'); } else { $win->AddMsgItem($this->UT($str, $titlerule)); } $win->AddTitle('作者'); if (empty($authorrule)) { $win->AddMsgItem('自动规则不需要测试'); } else { $win->AddMsgItem($this->UT($str, $authorrule)); } $win->AddTitle('来源'); if (empty($sourcerule)) { $win->AddMsgItem('自动规则不需要测试'); } else { $win->AddMsgItem($this->UT($str, $sourcerule)); } $win->AddTitle('文章内容(测试无法采集分页内容)'); if (empty($bodyrule)) { $win->AddMsgItem('自动规则不需要测试'); } else { $win->AddMsgItem($this->UT($str, $bodyrule)); } $win->AddTitle('分页链接'); if (empty($fyrule)) { $win->AddMsgItem('自动采集分页不需要测试'); } else { $fylink = $this->UT($str, $fyrule); $dhtml = new DedeHtml2(); $dhtml->SetSource($fylink, $first, 'link'); $relink = ''; foreach ($dhtml->Links as $k => $v) { $relink .= $k . "<br>"; } $win->AddMsgItem($relink); } $GLOBALS['winform'] = $win->GetWindow("hand"); $win->Display(); }