删除旧文件
This commit is contained in:
parent
c29d212cf1
commit
6a7687ba93
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,470 +0,0 @@
|
|||
<?php
|
||||
class Admin_HeiheController extends Zend_Controller_Action
|
||||
{
|
||||
function preDispatch()
|
||||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
}
|
||||
|
||||
function postDispatch()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function indexAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* projectsAction() 数据汇交计划
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function projectAction()
|
||||
{
|
||||
$this->view->input_NameDefaultVal = "专家姓名";
|
||||
$this->view->input_EmailDefaultVal = "专家email";
|
||||
$projectTable = "heiheproject";
|
||||
|
||||
$ac = $this->_getParam('ac');
|
||||
|
||||
if(empty($ac) || $ac == "index")
|
||||
{
|
||||
$this->_helper->viewRenderer('project');
|
||||
|
||||
//Search Link
|
||||
$this->view->searchLink = "/admin/heihe/project/ac/index/";
|
||||
|
||||
$q = $this->_getParam('q');
|
||||
|
||||
$wheresql = array();
|
||||
|
||||
if(!empty($q))
|
||||
{
|
||||
$wheresql[] = " (title LIKE '%$q%' OR
|
||||
code LIKE '%$q%' OR
|
||||
name LIKE '%$q%' OR
|
||||
email LIKE '%$q%')";
|
||||
$this->view->searchKeyword = $q;
|
||||
}
|
||||
|
||||
if(count($wheresql)>0)
|
||||
{
|
||||
$wheresql = join(" AND ",$wheresql);
|
||||
}else{
|
||||
$wheresql = "";
|
||||
}
|
||||
|
||||
if(!empty($wheresql))
|
||||
{
|
||||
$wheresql = " WHERE ".$wheresql;
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM $projectTable $wheresql
|
||||
ORDER BY id ASC";
|
||||
$sth = $this->db->query($sql);
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
foreach ($rows as $k=>$v)
|
||||
{
|
||||
$rows[$k]['status'] = $this->replacestatus($v['status']);
|
||||
}
|
||||
|
||||
$this->view->Count = count($rows);
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage(15);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
|
||||
}//ac == index
|
||||
|
||||
//邀请专家
|
||||
if($ac == "invite")
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$pid = $this->_getParam('id');
|
||||
$name = $this->_getParam('name');
|
||||
$email = $this->_getParam('email');
|
||||
|
||||
if(!is_numeric($pid))
|
||||
{
|
||||
$this->jsonexit(array("error"=>"参数错误"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if(empty($name) || $name == $this->view->input_NameDefaultVal)
|
||||
{
|
||||
$this->jsonexit(array("error"=>"请输入专家姓名"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if(empty($email) || $email == $this->view->input_EmailDefaultVal)
|
||||
{
|
||||
$this->jsonexit(array("error"=>"请输入专家Email"));
|
||||
return true;
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM $projectTable WHERE id=$pid";
|
||||
$sth = $this->db->query($sql);
|
||||
$row = $sth->fetch();
|
||||
|
||||
$expert_name = $this->getArray($row['expert_name']);
|
||||
$expert_email = $this->getArray($row['expert_email']);
|
||||
$expert_validation = $this->getArray($row['expert_validation']);
|
||||
$expert_created = $this->getArray($row['expert_created']);
|
||||
|
||||
$name_list = array();
|
||||
$email_list = array();
|
||||
$validation_list = array();
|
||||
$created_list = array();
|
||||
|
||||
if(is_array($expert_name) && count($expert_name)>0)
|
||||
{
|
||||
if(in_array($name,$expert_name))
|
||||
{
|
||||
$this->jsonexit(array("error"=>"该专家的姓名已经存在"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($expert_email) && count($expert_email)>0)
|
||||
{
|
||||
if(in_array($email,$expert_email))
|
||||
{
|
||||
$this->jsonexit(array("error"=>"该专家的Email已经存在"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$expert_name[] = $name;
|
||||
$expert_email[] = $email;
|
||||
$code = substr(md5($email),5,12);
|
||||
$expert_validation[] = $code;
|
||||
$expert_created[] = date("Y-m-d H:i:s",time());
|
||||
|
||||
|
||||
$name_list = $this->mkArray($expert_name);
|
||||
$email_list = $this->mkArray($expert_email);
|
||||
$validation_list = $this->mkArray($expert_validation);
|
||||
$created_list = $this->mkArray($expert_created);
|
||||
|
||||
$update = array(
|
||||
"expert_name"=>$name_list,
|
||||
"expert_email"=>$email_list,
|
||||
"expert_validation"=>$validation_list,
|
||||
"expert_created"=>$created_list
|
||||
);
|
||||
$where = "id=$pid";
|
||||
|
||||
if($this->db->update($projectTable,$update,$where))
|
||||
{
|
||||
$this->sendMailToExpert($pid,$name,$email,$code);
|
||||
$this->jsonexit(array("msg"=>"专家邀请成功!","invited"=>1));
|
||||
return true;
|
||||
}else{
|
||||
$this->jsonexit(array("error"=>"邀请失败,请重试"));
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}// 邀请专家
|
||||
|
||||
if($ac == "showexpert")
|
||||
{
|
||||
$del = $this->_getParam('del');
|
||||
|
||||
if(isset($del))
|
||||
{
|
||||
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
}else{
|
||||
$this->_helper->layout->setLayout('layout-iframe');
|
||||
$this->_helper->viewRenderer('project-showexpert');
|
||||
}
|
||||
|
||||
$pid = $this->_getParam('id');
|
||||
|
||||
if(empty($pid) || !is_numeric($pid))
|
||||
{
|
||||
$this->view->error = "参数错误";
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->view->pid = $pid;
|
||||
|
||||
$sql = "SELECT * FROM $projectTable WHERE id=$pid";
|
||||
$sth = $this->db->query($sql);
|
||||
$row = $sth->fetch();
|
||||
|
||||
if(empty($row['expert_name']))
|
||||
{
|
||||
$this->view->error = "此项目还没有添加跟踪专家";
|
||||
return true;
|
||||
}
|
||||
|
||||
$names = $this->getArray($row['expert_name']);
|
||||
$emails = $this->getArray($row['expert_email']);
|
||||
$validations = $this->getArray($row['expert_validation']);
|
||||
$created = $this->getArray($row['expert_created']);
|
||||
|
||||
$experts = array();
|
||||
|
||||
foreach($names as $k=>$v)
|
||||
{
|
||||
$experts[$k] = array(
|
||||
"name"=>$names[$k],
|
||||
"email"=>$emails[$k],
|
||||
"validation"=>$validations[$k],
|
||||
"created"=>$created[$k],
|
||||
"url"=>$this->makeInviteLink($pid,$validations[$k])
|
||||
);
|
||||
}
|
||||
|
||||
$this->view->experts = $experts;
|
||||
|
||||
$del = $this->_getParam('del');
|
||||
|
||||
if(isset($del))
|
||||
{
|
||||
|
||||
if(!is_numeric($del))
|
||||
{
|
||||
$this->jsonexit(array("error"=>"参数错误"));
|
||||
return true;
|
||||
}
|
||||
|
||||
unset($names[$del]);
|
||||
unset($emails[$del]);
|
||||
unset($validations[$del]);
|
||||
unset($created[$del]);
|
||||
|
||||
$update = array(
|
||||
"expert_name"=>$this->mkArray($names),
|
||||
"expert_email"=>$this->mkArray($emails),
|
||||
"expert_validation"=>$this->mkArray($validations),
|
||||
"expert_created"=>$this->mkArray($created),
|
||||
);
|
||||
$where = "id=$pid";
|
||||
|
||||
if($this->db->update($projectTable,$update,$where))
|
||||
{
|
||||
$this->jsonexit(array("deleted"=>1));
|
||||
return true;
|
||||
}else{
|
||||
$this->jsonexit(array("error"=>"邀请失败,请重试"));
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}//ac == showexpert 查看跟踪专家
|
||||
|
||||
if($ac == "upload")
|
||||
{
|
||||
$this->_helper->layout->setLayout('layout-iframe');
|
||||
$this->_helper->viewRenderer('project-upload');
|
||||
|
||||
$submit = $this->_getParam('submit');
|
||||
|
||||
$pid = $this->_getParam('pid');
|
||||
|
||||
if(empty($pid) || !is_numeric($pid))
|
||||
{
|
||||
$this->view->error = "参数错误";
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->view->pid = $pid;
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$uid = $user->id;
|
||||
}
|
||||
|
||||
if(!empty($submit) && empty($this->view->error))
|
||||
{
|
||||
|
||||
$files=new files();
|
||||
$msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'heihe');
|
||||
|
||||
if(empty($msg['error']))
|
||||
{
|
||||
$msg['error']="";
|
||||
$filename = $msg['db_path'];
|
||||
$filesize = $msg['file_size'];
|
||||
$filedesc = $this->_request->getParam('filedesc');
|
||||
$filetype = $msg['file_type'];
|
||||
$realname = $msg['realname'];
|
||||
|
||||
if(!empty($row['attachid']))
|
||||
{
|
||||
$sql = "SELECT * FROM attachments WHERE id={$row['attachid']}";
|
||||
$sth = $this->db->query($sql);
|
||||
$attach = $sth->fetch();
|
||||
$this->db->exec("DELETE FROM attachments WHERE id={$row['attachid']} AND filetype='heihe'");
|
||||
@unlink($this->view->config->upload.$attach['filename']);
|
||||
}
|
||||
|
||||
$sql = " INSERT INTO attachments (filename,filetype,filedesc,userid,filesize,realname) values
|
||||
('$filename','heihe','$filedesc','$uid','$filesize','$realname') RETURNING id";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$att = $sth->fetch(PDO::FETCH_ASSOC);
|
||||
$msg['attid'] = $attid = $att['id'];
|
||||
|
||||
$sql = "UPDATE heiheproject SET attachid=$attid WHERE id=$pid";
|
||||
$sth = $this->db->exec($sql);
|
||||
|
||||
if($sth)
|
||||
{
|
||||
$this->view->message = "上传成功";
|
||||
}else{
|
||||
@unlink($filename);
|
||||
$this->view->error = '附件上传失败:写入附件表出错';
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
@unlink($filename);
|
||||
$this->view->error = "附件上传失败".$msg['error'];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM heiheproject WHERE id=$pid";
|
||||
$sth = $this->db->query($sql);
|
||||
$row = $sth->fetch();
|
||||
|
||||
if(!empty($row['attachid']))
|
||||
{
|
||||
$sql = "SELECT * FROM attachments WHERE id = {$row['attachid']}";
|
||||
$sth = $this->db->query($sql);
|
||||
$this->view->att = $sth->fetch();
|
||||
}
|
||||
|
||||
return true;
|
||||
}//ac == upload
|
||||
|
||||
}//projectsAction()
|
||||
|
||||
function replacestatus($status)
|
||||
{
|
||||
if($status == 0)
|
||||
{
|
||||
return "计划未提交";
|
||||
}
|
||||
if($status == 1)
|
||||
{
|
||||
return "计划未审核";
|
||||
}
|
||||
if($status == 2)
|
||||
{
|
||||
return "跟踪专家审核";
|
||||
}
|
||||
if($status == 3)
|
||||
{
|
||||
return "跟踪专家通过";
|
||||
}
|
||||
if($status == 4)
|
||||
{
|
||||
return "数据委员会通过";
|
||||
}
|
||||
}
|
||||
|
||||
//从pgsql读取数组并拆分为php数组
|
||||
function getArray($str){
|
||||
if(strlen($str)>3)
|
||||
{
|
||||
return explode(",",substr($str,1,-1));
|
||||
}else{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//将php数组组装成pgsql中的数组
|
||||
function mkArray($array){
|
||||
if(!is_array($array))
|
||||
{
|
||||
return "{".$array."}";
|
||||
}
|
||||
if(count($array)==1)
|
||||
{
|
||||
$key = max(array_keys($array));
|
||||
return "{".$array[$key]."}";
|
||||
}
|
||||
if(count($array)>1)
|
||||
{
|
||||
return "{".join(",",$array)."}";
|
||||
}
|
||||
}
|
||||
|
||||
//发送邀请专家的邮件
|
||||
function sendMailToExpert($pid,$name,$email,$code)
|
||||
{
|
||||
$url = $this->makeInviteLink($pid,$code);
|
||||
|
||||
include_once("EmailText.php");
|
||||
$mailtp=new EmailText($this->db,"expert-invite",array(
|
||||
'name' => $name,
|
||||
'url' => $url,
|
||||
));
|
||||
//Email test code
|
||||
|
||||
/*
|
||||
$mail_config = array(
|
||||
'ssl' => 'ssl',
|
||||
'port' => 465,
|
||||
'auth' => 'login',
|
||||
'username' => 'la5c@qq.com',
|
||||
'password' => ''
|
||||
);
|
||||
$transport = new Zend_Mail_Transport_Smtp('smtp.qq.com', $mail_config);
|
||||
Zend_Mail::setDefaultTransport($transport);
|
||||
|
||||
$mail=new Zend_Mail();
|
||||
$mail->setBodyText($mailtp->getBody());
|
||||
$mail->setFrom('la5c@qq.com','Jack');
|
||||
$mail->addTo($email);
|
||||
$mail->setSubject($mailtp->getSubject());
|
||||
$mail->send();
|
||||
*/
|
||||
|
||||
$mail=new WestdcMailer($this->view->config->smtp);
|
||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||
$mail->setBodyText($mailtp->getBody());
|
||||
$mail->setSubject($mailtp->getSubject());
|
||||
$mail->addTo($email);
|
||||
$mail->send();
|
||||
}//发送邀请邮件
|
||||
|
||||
//生成邀请连接
|
||||
function makeInviteLink($pid,$code)
|
||||
{
|
||||
$http_base = "http://".$_SERVER ['HTTP_HOST'];
|
||||
$url = $http_base."/heihe/projects/invite/".$code.'/pid/'.$pid;
|
||||
return $url;
|
||||
}//生成邀请连接
|
||||
|
||||
public function jsonexit($data){
|
||||
$this->getResponse()
|
||||
->setHeader('Content-Type', 'application/json')
|
||||
->appendBody(json_encode($data,JSON_NUMERIC_CHECK));
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Admin_IndexController extends Zend_Controller_Action
|
||||
{
|
||||
function indexAction()
|
||||
{
|
||||
$this->view->title = "元数据";
|
||||
//echo "元数据显示";
|
||||
}
|
||||
function preDispatch()
|
||||
{
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->_helper->layout->setLayout('administry');
|
||||
}
|
||||
|
||||
function importAction()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,674 +0,0 @@
|
|||
<?php
|
||||
class Admin_NewsController extends Zend_Controller_Action
|
||||
{
|
||||
function preDispatch()
|
||||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
$this->_helper->layout->setLayout('administry');
|
||||
$this->view->theme = new Theme();
|
||||
}
|
||||
function postDispatch()
|
||||
{
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
function indexAction()
|
||||
{
|
||||
$News = new Archive($this->db);
|
||||
|
||||
$sql = "SELECT count(id) as c FROM ".$News->tbl_archives;
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
$this->view->totle = $row;
|
||||
|
||||
$sql = "SELECT count(id) as c FROM ".$News->tbl_categorys;
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
$this->view->typec = $row;
|
||||
|
||||
}//indexAction 首页
|
||||
|
||||
function newslistAction(){
|
||||
|
||||
$News = new Archive($this->db);
|
||||
|
||||
$type = $this->_request->getParam('type');
|
||||
|
||||
if(!empty($type))
|
||||
{
|
||||
$sql = "select n.*,c.id as typeid,c.title as catlog,c.code from ".$News->tbl_archives." n
|
||||
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
||||
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
||||
LEFT JOIN users u ON n.userid=u.id
|
||||
WHERE c.id='$type' AND n.title IS NOT NULL order by n.ts_created desc";
|
||||
}else
|
||||
{
|
||||
$sql = "select
|
||||
n.id,n.title,n.userid,n.ts_published,n.is_pub
|
||||
from ".$News->tbl_archives." n
|
||||
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
||||
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
||||
LEFT JOIN users u ON n.userid=u.id
|
||||
WHERE n.title IS NOT NULL
|
||||
GROUP BY n.id
|
||||
ORDER BY n.ts_created desc
|
||||
";
|
||||
}
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
|
||||
foreach($rows as $k=>$v)
|
||||
{
|
||||
if(empty($v['typeid']))
|
||||
{
|
||||
$ev = $News->getArchiveUrlByCid($v['id']);
|
||||
}else{
|
||||
$ev = $News->getArchiveUrlByCid($v['id'],$v['typeid']);
|
||||
}
|
||||
$rows[$k]['type_title'] = $ev['type_title'];
|
||||
$rows[$k]['type_url'] = $ev['type_url'];
|
||||
$rows[$k]['url'] = $ev['archive_url'];
|
||||
}
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
|
||||
$category = new ArchiveCategory($this->db);
|
||||
$this->view->types= $category->GetFullCategory();
|
||||
$this->view->type = $type;
|
||||
$this->view->deepField = $category->DeepTitle;
|
||||
}//newslistAction 新闻列表
|
||||
|
||||
function catlogAction()
|
||||
{
|
||||
$add = $this->_request->getParam('add');
|
||||
$submit = $this->_request->getParam('submit');
|
||||
|
||||
$delete = $this->_request->getParam('delete');
|
||||
|
||||
$edit = $this->_request->getParam('edit');
|
||||
|
||||
$News = new Archive($this->db);
|
||||
|
||||
if($add)
|
||||
{
|
||||
$this->view->ptype = $News->ptype;
|
||||
|
||||
$this->_helper->viewRenderer('category-add');
|
||||
|
||||
$category = new ArchiveCategory($this->db);
|
||||
$catlogs = $category->GetFullCategory();
|
||||
$this->view->categories=$catlogs;
|
||||
$this->view->deepField = $category->DeepTitle;
|
||||
|
||||
if(empty($submit)){
|
||||
|
||||
//$this->_helper->viewRenderer('category-add');
|
||||
|
||||
}else{
|
||||
|
||||
$data = array();
|
||||
|
||||
$data['title'] = $this->_request->getParam('ctitle');
|
||||
$data['code'] = $this->_request->getParam('code');
|
||||
$data['fid'] = $this->_request->getParam('fid');
|
||||
$data['ptype'] = $this->_request->getParam('ptype');
|
||||
|
||||
$data['is_pub'] = 1;
|
||||
|
||||
$this->view->info = $data;
|
||||
|
||||
if(empty($data['title']))
|
||||
{
|
||||
$this->view->error = "请输入标题";
|
||||
return true;
|
||||
}
|
||||
|
||||
if(empty($data['code']))
|
||||
{
|
||||
$this->view->error = "请输入栏目连接,如http://westdc.westgis.ac.cn/news/notice,则只需要输入notice";
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!preg_match("/^[a-z]+$/",$data['code']))
|
||||
{
|
||||
$this->view->error = "url格式不正确,仅允许26个小写字母";
|
||||
return true;
|
||||
}
|
||||
|
||||
$LftRgt = $category->Insert($data['fid']);
|
||||
$data['tid'] = $data['fid'];
|
||||
$data['lft'] = $LftRgt['left'];
|
||||
$data['rgt'] = $LftRgt['right'];
|
||||
unset($data['fid']);
|
||||
|
||||
if($this->db->insert($category->CategoryTable,$data))
|
||||
{
|
||||
$this->view->msg = '提示信息:栏目添加成功!';
|
||||
$this->view->jump_url = '/admin/news/catlog';
|
||||
return true;
|
||||
}else{
|
||||
$this->view->error = "添加失败,请重试";
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}//栏目添加
|
||||
if($delete>0)
|
||||
{
|
||||
$sql = "delete from ".$News->tbl_categorys." where id='$delete'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('提示信息:栏目删除成功!');
|
||||
$this->_redirect('/admin/news/catlog');
|
||||
}
|
||||
|
||||
}//栏目删除
|
||||
|
||||
if($edit>0)
|
||||
{
|
||||
$submit = $this->_getParam('submit');
|
||||
$this->_helper->viewRenderer('category-edit');
|
||||
|
||||
$this->view->ptype = $News->ptype;
|
||||
$category = new ArchiveCategory($this->db);
|
||||
$this->view->info = $category->GetOne($edit);
|
||||
$this->view->categories = $category->GetFullCategory();
|
||||
$this->view->deepField = $category->DeepTitle;
|
||||
|
||||
if(!empty($submit))
|
||||
{
|
||||
|
||||
$data = array();
|
||||
|
||||
$data['title'] = $this->_request->getParam('ctitle');
|
||||
$data['code'] = $this->_request->getParam('code');
|
||||
$data['fid'] = $this->_request->getParam('fid');
|
||||
$data['ptype'] = $this->_request->getParam('ptype');
|
||||
$data['is_pub'] = $this->_request->getParam('is_pub');
|
||||
|
||||
$this->view->info = $data;
|
||||
|
||||
if(empty($data['title']))
|
||||
{
|
||||
$this->view->error = "请输入标题";
|
||||
return true;
|
||||
}
|
||||
|
||||
if(empty($data['code']))
|
||||
{
|
||||
$this->view->error = "请输入栏目连接,如http://westdc.westgis.ac.cn/news/notice,则只需要输入notice";
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!preg_match("/^[a-z]+$/",$data['code']))
|
||||
{
|
||||
$this->view->error = "url格式不正确,仅允许26个小写字母";
|
||||
return true;
|
||||
}
|
||||
|
||||
$LftRgt = $category->Insert($data['fid']);
|
||||
$data['tid'] = $data['fid'];
|
||||
$data['lft'] = $LftRgt['left'];
|
||||
$data['rgt'] = $LftRgt['right'];
|
||||
unset($data['fid']);
|
||||
|
||||
if($this->db->update($News->tbl_categorys,$data,"id=$edit"))
|
||||
{
|
||||
$this->view->msg = '提示信息:栏目添加成功!';
|
||||
$this->view->jump_url = '/admin/news/catlog';
|
||||
return true;
|
||||
}else{
|
||||
$this->view->error = "添加失败,请重试";
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}//栏目编辑
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
$category = new ArchiveCategory($this->db);
|
||||
$News = new Archive($this->db);
|
||||
|
||||
$catlogs = $category->GetFullCategory();
|
||||
$ptype = $News->ptype;
|
||||
|
||||
foreach($catlogs as $k=>$v)
|
||||
{
|
||||
$url_parts = array(
|
||||
"ptype"=>$v['ptype'],
|
||||
"type_code"=>$v['code']
|
||||
);
|
||||
$catlogs[$k]['url'] = $News->makeCategoryUrl($url_parts);
|
||||
|
||||
foreach($ptype as $kk=>$vv)
|
||||
{
|
||||
if($catlogs[$k]['ptype'] == $vv)
|
||||
{
|
||||
$catlogs[$k]['ptype'] = $kk;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->catlogs=$catlogs;
|
||||
$this->view->deepField = $category->DeepTitle;
|
||||
}//栏目列表
|
||||
|
||||
|
||||
}//栏目管理
|
||||
|
||||
function getSubCategory($fid)
|
||||
{
|
||||
$sql = "SELECT * FROM news_category WHERE fid=?";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($fid));
|
||||
$rows = $sth->fetchAll();
|
||||
if(empty($rows) || count($rows)<1)
|
||||
{
|
||||
return 0;
|
||||
}else{
|
||||
return $rows;
|
||||
}
|
||||
}
|
||||
|
||||
function getCategory($id)
|
||||
{
|
||||
$sql = "SELECT * FROM news_category WHERE id=?";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($id));
|
||||
$rows = $sth->fetch();
|
||||
return $rows;
|
||||
}
|
||||
|
||||
function getAllcategory($id=0)
|
||||
{
|
||||
$_addon = '';
|
||||
if(!empty($id))
|
||||
{
|
||||
$_addon = "WHERE id not in ($id)";
|
||||
}
|
||||
$sql = "SELECT * FROM ar_category $_addon ORDER BY id DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
return $sth->fetchAll();
|
||||
}
|
||||
|
||||
|
||||
//新闻添加页面
|
||||
function newsaddAction()
|
||||
{
|
||||
$category = new ArchiveCategory($this->db);
|
||||
$catlogs = $category->GetFullCategory();
|
||||
$this->view->types=$catlogs;
|
||||
$this->view->deepField = $category->DeepTitle;
|
||||
}//newsadd 新闻添加
|
||||
|
||||
//文档编辑
|
||||
function newseditAction()
|
||||
{
|
||||
|
||||
$News = new Archive($this->db);
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
|
||||
$sql = "SELECT * FROM ar_catalog WHERE aid=$id";
|
||||
$sth = $this->db->query($sql);
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$types = array();
|
||||
foreach($rows as $k=>$v)
|
||||
{
|
||||
$types[$v['id']] = $v['cid'];
|
||||
}
|
||||
$this->view->typeid = $types;
|
||||
|
||||
$sql = "select arc.*,ct.cid as typeid from ".$News->tbl_archives." arc
|
||||
LEFT JOIN ".$News->tbl_catalog." ct ON arc.id=ct.aid
|
||||
where arc.id=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
|
||||
$this->view->ev = $row;
|
||||
|
||||
if(!empty($row['image']))
|
||||
{
|
||||
$sql = "SELECT * FROM attachments WHERE filename='".str_replace("/upload/",'',$row['image'])."'";
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
$this->view->att = $row;
|
||||
}
|
||||
|
||||
$this->view->keywords = join(",",$News->GetTags($id));
|
||||
|
||||
$category = new ArchiveCategory($this->db);
|
||||
$catlogs = $category->GetFullCategory();
|
||||
$this->view->types=$catlogs;
|
||||
$this->view->deepField = $category->DeepTitle;
|
||||
}
|
||||
|
||||
//文档编辑或者添加
|
||||
function archivesaddAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$News = new Archive($this->db);
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$uid = $user->id;
|
||||
}
|
||||
|
||||
$datavar = array(
|
||||
'title',
|
||||
'source',
|
||||
'image',
|
||||
'body',
|
||||
'typeid',
|
||||
'pub',
|
||||
'pubtimer',
|
||||
'pubtime',
|
||||
'description',
|
||||
'keyword'
|
||||
);
|
||||
foreach($_POST as $k=>$v)
|
||||
{
|
||||
if(in_array($k,$datavar))
|
||||
{
|
||||
$$k=$v;
|
||||
}
|
||||
}
|
||||
|
||||
$msg=array();
|
||||
if(empty($title)) $msg[]="标题不能为空";
|
||||
if(mb_strlen($title)>200) $msg[]="标题长度不能超过200个字符";
|
||||
if(mb_strlen($keyword)>200) $msg[] = "关键词长度不能超过200个字符,现在输入了".strlen($keyword)."个字符";
|
||||
if(mb_strlen($description)>1000) $msg[] = "内容描述不能超过1000个字符,现在输入了".strlen($description)."个字符";
|
||||
if(empty($body)) $msg[]="请填写内容";
|
||||
if(empty($typeid)) $msg[]="请选择栏目";
|
||||
if(!is_array($typeid) || count($typeid)<1)
|
||||
{
|
||||
$msg[]="请选择栏目";
|
||||
}
|
||||
|
||||
if(count($msg)>0)
|
||||
{
|
||||
echo '<div class="box box-error">发布失败:</div>
|
||||
<div class="box box-error-msg">
|
||||
<ol>';
|
||||
foreach ($msg as $v)
|
||||
{
|
||||
echo '<li>'.$v.'</li>';
|
||||
}
|
||||
echo'</ol>
|
||||
</div>
|
||||
';
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!empty($pubtimer))
|
||||
{
|
||||
$pubtime = date("Y-m-d H:i:s",strtotime($pubtime));
|
||||
}
|
||||
else
|
||||
{
|
||||
$pubtime = date("Y-m-d H:i:s",time());
|
||||
}
|
||||
|
||||
$data=array(
|
||||
'title' => $title,
|
||||
'userid' => $uid,
|
||||
'description'=> $description,
|
||||
'image' => $image,
|
||||
'source' => $source,
|
||||
'ts_published' => $pubtime,
|
||||
'is_pub' => $pub,
|
||||
'body' => $body
|
||||
);
|
||||
|
||||
$update = $this->_getParam('update');
|
||||
|
||||
if(is_numeric($update) && !empty($update))
|
||||
{
|
||||
$updated = $News->updateArchive($update,$data,$typeid,$keyword);
|
||||
if($updated>0)
|
||||
{
|
||||
echo '<div class="box box-success">修改成功!</div><script>
|
||||
setTimeout("self.location=\'/admin/news/newslist\'",500);
|
||||
</script>';
|
||||
return true;
|
||||
}else{
|
||||
echo '<div class="box box-success">修改失败!请重试</div>';
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
try{
|
||||
$newAid = $News->addArchive($data,$typeid,$keyword);
|
||||
if($newAid>0){
|
||||
echo '<div class="box box-success">发布成功!</div><script>
|
||||
setTimeout("self.location=\'/admin/news/newslist\'",500);
|
||||
</script>';
|
||||
return true;
|
||||
}else{
|
||||
echo '<div class="box box-error">发布失败!请重试</div>';
|
||||
return true;
|
||||
}
|
||||
|
||||
}catch(Exception $e){
|
||||
echo '<div class="box box-error">文章发布失败:</div>
|
||||
<div class="box box-error-msg">
|
||||
<ol>
|
||||
<li>'.$e->getMessage().'</li>
|
||||
</ol>
|
||||
</div>';
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}// 文章发布
|
||||
|
||||
function deleteAction(){
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
|
||||
|
||||
$News = new Archive($this->db);
|
||||
$News->DeleteArchives($id);
|
||||
|
||||
$this->messenger->addMessage('提示信息:档案删除成功!');
|
||||
$this->_redirect('/admin/news/newslist');
|
||||
|
||||
}//文章删除
|
||||
|
||||
|
||||
function uploadAction(){
|
||||
try{
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
}
|
||||
|
||||
include_once('files.php');
|
||||
$files=new files();
|
||||
$msg = $files -> upload('../htdocs/upload/',$_FILES['Filedata'],'image');
|
||||
|
||||
if(empty($msg['error']))
|
||||
{
|
||||
$msg['error']="";
|
||||
$filename = $msg['db_path'];
|
||||
$filesize = $msg['file_size'];
|
||||
$filedesc = $this->_request->getParam('filedesc');
|
||||
$filetype = 'thumb';
|
||||
$realname = $msg['realname'];
|
||||
$fileurl = $msg['file_url'];
|
||||
|
||||
$sql = "insert into attachments (filename,filetype,filedesc,userid,filesize,realname) values ('$filename','$filetype','$filedesc','$userid','$filesize','$realname') RETURNING id";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$att = $sth->fetch(PDO::FETCH_ASSOC);
|
||||
$msg['attid'] = $attid = $att['id'];
|
||||
|
||||
$imgct = files::getImageType('../htdocs/upload/'.$filename);
|
||||
|
||||
if(!isset($imgct['error'])) $preview = '<img src="/upload/'.$filename.'" style="display:block;max-height:300px;" />';
|
||||
else $preview = "";
|
||||
|
||||
$msg['html'] = $preview.$realname.'[已完成]<input type="hidden" name="image" value="/upload/'.$filename.'" /><div class="cancel"><a href="javascript:;" id="deletebtn_'.$attid.'"><img border="0" src="/static/js/uploadify/cancel.png" /></a></div>';
|
||||
$msg['preview'] = "/images/".$attid;
|
||||
echo Zend_Json::encode($msg);
|
||||
exit();
|
||||
}else{
|
||||
$msg['error'] = '附件上传失败:'.$msg['error'];
|
||||
@unlink($filename);
|
||||
echo Zend_Json::encode($msg);
|
||||
exit();
|
||||
}
|
||||
|
||||
}catch(Exception $e){
|
||||
$msg['error'] = "错误:".$e->getMessage();
|
||||
echo Zend_Json::encode($msg);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
function getattsAction(){
|
||||
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
|
||||
if($id!='')
|
||||
{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$sql = "select att.realname,att.id,att.filename from attachments att
|
||||
left join archives_att ratt on att.id=ratt.attid
|
||||
where ratt.arcid=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$atts = $rs->fetchAll();
|
||||
|
||||
include_once('files/files.php');
|
||||
|
||||
foreach($atts as $k=>$v)
|
||||
{
|
||||
$imgct = files::getImageType('../htdocs/upload/'.$v['filename']);
|
||||
|
||||
if(!isset($imgct['error'])) $preview = '<img src="/images/'.$v['id'].'" style="display:block;" />';
|
||||
else $preview = "";
|
||||
|
||||
$atts[$k]['html']= $preview.$v['realname'].'[已完成]<input type="hidden" name="atts[]" value="'.$v['id'].'" /><div class="cancel"><a href="javascript:;" id="deletebtn_'.$v['id'].'"><img border="0" src="/static/js/uploadify/cancel.png" /></a></div>';
|
||||
}
|
||||
|
||||
echo Zend_Json::encode($atts);
|
||||
exit();
|
||||
}else
|
||||
{
|
||||
exit();
|
||||
}
|
||||
}else{
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function delattAction(){
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$id = $this->_request->getParam('id');
|
||||
$aid = $this->_getParam('aid');
|
||||
$basepath = '../htdocs/upload/';
|
||||
$info = $this->getFileinfo($id);
|
||||
$filepath = $basepath.$info['filename'];
|
||||
try{
|
||||
if(empty($aid))
|
||||
{
|
||||
$sql = "DELETE FROM attachments WHERE id=$id";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
@unlink($filepath);
|
||||
}
|
||||
}else{
|
||||
$sql = "delete from archives_att where attid='$id' and arcid='$aid'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$sql = "DELETE FROM attachments WHERE id=$id";
|
||||
if($this->db->exec($sql)>0){@unlink($filepath);}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception $e){}
|
||||
}
|
||||
|
||||
public function getFileinfo($id){
|
||||
$sql = "select * from attachments where id='$id'";
|
||||
$re= $this->db->query($sql);
|
||||
$row= $re->fetch();
|
||||
return $row;
|
||||
}
|
||||
|
||||
public function jsonexit($data){
|
||||
$this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(Zend_Json::encode($data));
|
||||
return true;
|
||||
}
|
||||
|
||||
function replacehtml($html)
|
||||
{
|
||||
$newString = htmlentities($html, ENT_QUOTES, "UTF-8");
|
||||
return $newString;
|
||||
}
|
||||
|
||||
public function moveAction()
|
||||
{
|
||||
$up = (int)$this->_getParam('up');
|
||||
$down = (int)$this->_getParam('down');
|
||||
|
||||
include_once('helper/view.php');
|
||||
include_once('ArchiveCategory.php');
|
||||
|
||||
if(empty($up) && empty($down))
|
||||
{
|
||||
view::Post("参数错误",$this,-1);
|
||||
return true;
|
||||
}
|
||||
|
||||
$category = new ArchiveCategory($this->db);
|
||||
|
||||
if(!empty($up))
|
||||
{
|
||||
$s = $category->move('up',$up);
|
||||
}
|
||||
if(!empty($down))
|
||||
{
|
||||
$s = $category->move('down',$down);
|
||||
}
|
||||
|
||||
if(is_array($s))
|
||||
{
|
||||
$this->view->moved = $s;
|
||||
}else{
|
||||
view::Post($this,$s,-1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,437 +0,0 @@
|
|||
<?php
|
||||
class Admin_StatController extends Zend_Controller_Action
|
||||
{
|
||||
function preDispatch()
|
||||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
$this->view->theme = new Theme();
|
||||
$this->_helper->layout->setLayout('administry');
|
||||
}
|
||||
function postDispatch()
|
||||
{
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
function indexAction()
|
||||
{
|
||||
$sql="select (select count(id) from users) as alluser,
|
||||
(select count(id) from normalmetadata) as alldata,
|
||||
(select count(id) as num from dataorder where status=0) as onlinedown,
|
||||
(select count(id) as num from dataorder where status=5) as offlinedown,
|
||||
(select count(id) as num from offlineapp where ts_approved is not null) as offlinepass,
|
||||
(select count(id) as num from offlineapp where ts_approved is null) as offlineunfinished,
|
||||
(select count(id) as num from dataorder where offlineappid>0 and status=-1) as offlinedenied,
|
||||
(select count(id) as num from onlineapp) as onlineapp";
|
||||
$this->view->stat=$this->db->fetchRow($sql);
|
||||
|
||||
//下载量统计
|
||||
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join metadata m on d.uuid=m.uuid where (d.status=0 or d.status=5) and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
||||
$res = $this->db->query($sql);
|
||||
$allsize = $res->fetch();
|
||||
$this->view->allsize = $allsize;
|
||||
|
||||
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join metadata m on d.uuid=m.uuid where d.status=5 and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
||||
$res = $this->db->query($sql);
|
||||
$offlinesize = $res->fetch();
|
||||
$this->view->offlinesize = $offlinesize;
|
||||
|
||||
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join metadata m on d.uuid=m.uuid where d.status=0 and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
||||
$res = $this->db->query($sql);
|
||||
$onlinesize = $res->fetch();
|
||||
$this->view->onlinesize = $onlinesize;
|
||||
|
||||
$sql="select sum(configvalue::real)/1024/1024/1024 as num from g6ftpusersettings where userid in (select id from g6ftpusers where name like 'westdc%' or name='newwestdc') and configname='StatsDownloaded'";
|
||||
$res = $this->db->query($sql);
|
||||
$onlinesize = $res->fetch();
|
||||
$this->view->onlineg6size = $onlinesize;
|
||||
|
||||
|
||||
}//indexAction 首页
|
||||
|
||||
function unitAction()
|
||||
{
|
||||
$ac = $this->_getParam('ac');
|
||||
$y = (int)$this->_request->getParam('y');
|
||||
|
||||
if(!empty($y))
|
||||
{
|
||||
$n = date("Y",time());
|
||||
if($y<2004 || $y>$n)
|
||||
{
|
||||
$y=$n;
|
||||
}
|
||||
}
|
||||
$this->view->y = $y;
|
||||
|
||||
//各单位下载情况,统计的离线申请数据条数,需要有对应的dataorder记录
|
||||
/*$sql = "select count(d.id) as num,o.unit from dataorder d
|
||||
left join offlineapp o on o.id=d.offlineappid
|
||||
where d.offlineappid>0 and o.unit is not null and d.status>4";*/
|
||||
//各单位下载情况,统计的离线申请数据次数
|
||||
$sql = "select count(o.id) as num,o.unit from offlineapp o
|
||||
where o.unit is not null ";
|
||||
if ($y)
|
||||
$sql.=" and extract(year from o.ts_created)='$y'";
|
||||
$sql.=" group by o.unit";
|
||||
$fe = $this->db->query($sql);
|
||||
$unitoffline = $fe->fetchAll();
|
||||
|
||||
//各单位在线下载情况
|
||||
$sql = "select count(d.id) as num,o.unit from dataorder d
|
||||
left join onlineapp o on o.id=d.onlineappid
|
||||
where d.onlineappid>0 and o.unit is not null";
|
||||
if ($y)
|
||||
$sql.=" and extract(year from o.ts_created)='$y'";
|
||||
$sql.=" group by o.unit";
|
||||
$fe = $this->db->query($sql);
|
||||
$unitonline = $fe->fetchAll();
|
||||
|
||||
$units = array();
|
||||
|
||||
foreach($unitonline as $k=>$v)
|
||||
{
|
||||
if(isset($v['num']))
|
||||
{
|
||||
$units[$v['unit']]['online'] = $v['num'];
|
||||
}
|
||||
}
|
||||
|
||||
foreach($unitoffline as $k=>$v)
|
||||
{
|
||||
if(isset($v['num']))
|
||||
{
|
||||
$units[$v['unit']]['offline'] = $v['num'];
|
||||
}
|
||||
}
|
||||
|
||||
$index = 1;
|
||||
|
||||
foreach($units as $k=>$v)
|
||||
{
|
||||
if(!isset($v['online']))
|
||||
{
|
||||
$units[$k]['online'] = 0;
|
||||
}
|
||||
|
||||
if(!isset($v['offline']))
|
||||
{
|
||||
$units[$k]['offline'] = 0;
|
||||
}
|
||||
|
||||
$units[$k]['total'] = $units[$k]['online'] + $units[$k]['offline'];
|
||||
|
||||
$units[$k]['index'] = $index++;
|
||||
}
|
||||
|
||||
if($ac == "out")
|
||||
{
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
if(empty($type) || $type == "csv")
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
include_once("Stat.php");
|
||||
$stat = new Stat($this->db);
|
||||
|
||||
$head = array("id","单位名称","离线申请次数","在线申请次数","总申请次数");
|
||||
|
||||
$content = array();
|
||||
|
||||
foreach($units as $k=>$v)
|
||||
{
|
||||
$content[] = array(
|
||||
$v['index'],
|
||||
$k,
|
||||
$v['offline'],
|
||||
$v['online'],
|
||||
$v['total']
|
||||
);
|
||||
unset($units[$k]);
|
||||
}
|
||||
|
||||
array_unshift($content,$head);
|
||||
|
||||
$stat->Download("westdc-download-status.csv",$content,"csv");
|
||||
exit();
|
||||
}
|
||||
|
||||
if($type == "json")
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
include_once("Stat.php");
|
||||
$stat = new Stat($this->db);
|
||||
|
||||
$content = array();
|
||||
|
||||
foreach($units as $k=>$v)
|
||||
{
|
||||
$content[] = array(
|
||||
'index'=>$v['index'],
|
||||
'unit'=>$k,
|
||||
'offline'=>$v['offline'],
|
||||
'online'=>$v['online'],
|
||||
'total'=>$v['total']
|
||||
);
|
||||
unset($units[$k]);
|
||||
}
|
||||
|
||||
$stat->Download("westdc-download-status.json",$content,"json");
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->view->units = $units;
|
||||
|
||||
|
||||
}//分单位统计
|
||||
|
||||
//按用户统计
|
||||
function userAction(){
|
||||
|
||||
$ac = $this->_getParam('ac');
|
||||
|
||||
if($ac == "get")
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
include_once("Stat.php");
|
||||
$stat = new Stat($this->db);
|
||||
|
||||
$rows = $stat->UserDataorder();
|
||||
|
||||
$down = $this->_getParam('down');
|
||||
if(empty($down))
|
||||
{
|
||||
$this->jsonexit(array("aaData"=>$rows));
|
||||
return true;
|
||||
}
|
||||
|
||||
if($down == "csv")
|
||||
{
|
||||
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$head = array("id","姓名","离线申请次数","在线申请次数","总申请次数");
|
||||
|
||||
array_unshift($rows,$head);
|
||||
|
||||
$stat->Download("westdc-download-status.csv",$rows,"csv");
|
||||
exit();
|
||||
|
||||
}
|
||||
|
||||
if($down == "json")
|
||||
{
|
||||
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
/*
|
||||
$head = array("id","姓名","离线申请次数","在线申请次数","总申请次数");
|
||||
|
||||
array_unshift($rows,$head);
|
||||
*/
|
||||
|
||||
$stat->Download("westdc-download-status.json",$rows,"json");
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}//userAction()
|
||||
|
||||
function monthAction(){
|
||||
|
||||
$y = (int)$this->_request->getParam('y');
|
||||
|
||||
if(!empty($y))
|
||||
{
|
||||
$n = date("Y",time());
|
||||
if($y<2004 || $y>$n)
|
||||
{
|
||||
$y=$n;
|
||||
}
|
||||
}
|
||||
$this->view->y = $y;
|
||||
$sql = "select count(extract(month from ts_created)) as c,extract(month from ts_created) as m,extract(year from ts_created) as y from onlineapp
|
||||
where id in (select distinct(onlineappid) from dataorder)";
|
||||
if ($y)
|
||||
$sql.=" and extract(year from ts_created)='$y' ";
|
||||
$sql.=" group by extract(month from ts_created),extract(year from ts_created)
|
||||
order by extract(year from ts_created),extract(month from ts_created)";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
|
||||
$this->view->data = $rows;
|
||||
|
||||
$sql = "select count(extract(month from ts_created)) as c,extract(month from ts_created) as m,extract(year from ts_created) as y from dataorder
|
||||
where status=0";
|
||||
if ($y)
|
||||
$sql.=" and extract(year from ts_created)='$y' ";
|
||||
$sql.=" group by extract(month from ts_created),extract(year from ts_created)
|
||||
order by extract(year from ts_created),extract(month from ts_created)";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
$this->view->online = $rows;
|
||||
|
||||
$sql = "select count(extract(month from ts_created)) as c,extract(month from ts_created) as m,extract(year from ts_created) as y from offlineapp
|
||||
where ts_approved is not null";
|
||||
if ($y)
|
||||
$sql.=" and extract(year from ts_created)='$y' ";
|
||||
$sql.=" group by extract(month from ts_created),extract(year from ts_created)
|
||||
order by extract(year from ts_created),extract(month from ts_created)";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
|
||||
if(count($rows)<=0)
|
||||
{
|
||||
$this->view->offline="";
|
||||
}
|
||||
|
||||
$this->view->offline = $rows;
|
||||
|
||||
$sql = "select count(extract(month from ts_created)) as c,extract(month from ts_created) as m,extract(year from ts_created) as y from users";
|
||||
if ($y)
|
||||
$sql.=" where extract(year from ts_created)='$y' ";
|
||||
$sql.=" group by extract(month from ts_created),extract(year from ts_created)
|
||||
order by extract(year from ts_created),extract(month from ts_created)";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
if(count($rows)<=0)
|
||||
{
|
||||
$this->view->newuser="";
|
||||
}
|
||||
|
||||
$this->view->newuser = $rows;
|
||||
|
||||
|
||||
|
||||
}//按月份统计
|
||||
|
||||
function awstatswebAction()
|
||||
{
|
||||
|
||||
}//awstats web 统计
|
||||
|
||||
function awstatsweb2Action()
|
||||
{
|
||||
|
||||
}//awstats web 统计
|
||||
|
||||
function awstatsftpAction()
|
||||
{
|
||||
|
||||
}//awstats ftp 统计
|
||||
|
||||
function awstatsftp2Action()
|
||||
{
|
||||
|
||||
}//awstats ftp 统计
|
||||
|
||||
function webalizerAction()
|
||||
{
|
||||
|
||||
}//webalizer 统计
|
||||
|
||||
function waterAction()
|
||||
{
|
||||
|
||||
$sql="select count(k.keyword) as num,d.status,k.keyword from dataorder d left join metadata m on d.uuid=m.uuid
|
||||
left join keyword k on m.id=k.id
|
||||
where (d.status=5 or d.status=-1) and m.source='0595169a-279e-4b95-819f-129d0ba4280d'
|
||||
and (k.keyword='航空遥感' or k.keyword='卫星遥感' or k.keyword='气象水文' or k.keyword='上游寒区水文试验区' or k.keyword='森林水文试验区' or k.keyword='中游干旱区水文试验区')
|
||||
group by k.keyword,d.status order by k.keyword desc,d.status desc";
|
||||
|
||||
$re =$this->db->query($sql);
|
||||
$type =$re->fetchAll();//按分类
|
||||
|
||||
$this->view->type = $type;
|
||||
|
||||
$sql="select count(extract(month from o.ts_created)) as c,extract(month from o.ts_created) as m,extract(year from o.ts_created) as y
|
||||
from offlineapp o left join dataorder d on d.offlineappid=o.id left join metadata m on m.uuid=d.uuid
|
||||
where m.source='0595169a-279e-4b95-819f-129d0ba4280d' and (d.status=3 or d.status=5 or d.status=-1)
|
||||
group by extract(month from o.ts_created),extract(year from o.ts_created)
|
||||
order by extract(year from o.ts_created),extract(month from o.ts_created)";
|
||||
|
||||
$re=$this->db->query($sql);
|
||||
$month=$re->fetchAll();
|
||||
|
||||
$this->view->month = $month;
|
||||
|
||||
$sql = "select
|
||||
extract(year from o.ts_created) as y,extract(month from o.ts_created) as m,
|
||||
count(extract(month from o.ts_created)) as c
|
||||
from
|
||||
(select distinct(o.id),o.ts_created
|
||||
from offlineapp o where o.datalist like '%黑河综合遥感联合试验%') as o
|
||||
group by extract(month from o.ts_created),extract(year from o.ts_created)
|
||||
order by extract(year from o.ts_created),extract(month from o.ts_created)";
|
||||
|
||||
$re=$this->db->query($sql);
|
||||
$order=$re->fetchAll();
|
||||
|
||||
$this->view->order = $order;
|
||||
|
||||
$sql = "select (sum(m.filesize)/1024) as n from dataorder d left join metadata m on d.uuid=m.uuid
|
||||
where d.status=5 and m.source='0595169a-279e-4b95-819f-129d0ba4280d'";
|
||||
|
||||
$re=$this->db->query($sql);
|
||||
$num=$re->fetchAll();
|
||||
|
||||
$this->view->num=$num;
|
||||
|
||||
|
||||
$sql = "select count(lower(o.unit)) as c,lower(o.unit) as u
|
||||
from offlineapp o left join dataorder d on d.offlineappid=o.id left join metadata m on m.uuid=d.uuid
|
||||
where m.source='0595169a-279e-4b95-819f-129d0ba4280d' and (d.status=5)
|
||||
group by lower(o.unit)
|
||||
order by lower(o.unit)";
|
||||
|
||||
$re=$this->db->query($sql);
|
||||
$units=$re->fetchAll();
|
||||
|
||||
$this->view->units=$units;
|
||||
|
||||
|
||||
$sql = "select count(t.unit) as c,t.unit from
|
||||
(select distinct(o.id),o.unit
|
||||
from offlineapp o left join dataorder d on d.offlineappid=o.id left join metadata m on m.uuid=d.uuid
|
||||
where m.source='0595169a-279e-4b95-819f-129d0ba4280d' and (d.status=5)
|
||||
) as t
|
||||
group by t.unit";
|
||||
|
||||
$re = $this->db->query($sql);
|
||||
$ounit= $re->fetchAll();
|
||||
|
||||
$this->view->ounit = $ounit;
|
||||
|
||||
//water 项目按月统计下载量
|
||||
$sql = "select (sum(m.filesize)/1024) as n,extract(month from d.ts_created) as m,extract(year from d.ts_created) as y from dataorder d left join metadata m on d.uuid=m.uuid
|
||||
where d.status=5 and m.source='0595169a-279e-4b95-819f-129d0ba4280d'
|
||||
group by extract(month from d.ts_created),extract(year from d.ts_created)
|
||||
order by extract(year from d.ts_created),extract(month from d.ts_created)";
|
||||
|
||||
$re = $this->db->query($sql);
|
||||
$dm = $re->fetchAll();
|
||||
|
||||
$this->view->dm = $dm;
|
||||
|
||||
|
||||
}//WATER项目
|
||||
|
||||
public function jsonexit($data){
|
||||
$this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(json_encode($data,JSON_NUMERIC_CHECK));
|
||||
return true;
|
||||
}//jsonexit() 退出并返回json数据
|
||||
|
||||
}
|
||||
|
|
@ -1,712 +0,0 @@
|
|||
<?php
|
||||
class Admin_SysController extends Zend_Controller_Action
|
||||
{
|
||||
function preDispatch()
|
||||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
$this->_helper->layout->setLayout('administry');//新UI
|
||||
$this->view->theme = new Theme();
|
||||
}
|
||||
|
||||
function postDispatch()
|
||||
{
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
|
||||
function indexAction()
|
||||
{
|
||||
//$this->_helper->viewRenderer('');
|
||||
//$this->messenger->addMessage('');
|
||||
//$this->_redirect('');
|
||||
}//indexAction 首页
|
||||
|
||||
function emailtextAction(){
|
||||
|
||||
$ac = $this->_request->getParam('ac');
|
||||
$submit = $this->_request->getParam('submit');
|
||||
$id = $this->_request->getParam('id');
|
||||
|
||||
if($ac=='add' && empty($submit))
|
||||
{
|
||||
$this->_helper->viewRenderer('emailtextadd');
|
||||
}
|
||||
|
||||
if($ac=='add' && !empty($submit))
|
||||
{
|
||||
$title = $this->_request->getParam('title');
|
||||
$template = $this->_request->getParam('template');
|
||||
$body = $this->_request->getParam('body');
|
||||
|
||||
if(empty($title)) $title=='未命名模板';
|
||||
|
||||
$sql = "insert into emailtext (subject,template,body) values ('$title','$template','$body')";
|
||||
|
||||
try{
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('模板添加成功');
|
||||
$this->_redirect('/admin/sys/emailtext');
|
||||
}
|
||||
}catch(Exception $e){
|
||||
$this->messenger->addMessage('模板添加失败:'.$e->getMessage());
|
||||
$this->_redirect('/admin/sys/emailtext');
|
||||
}
|
||||
}//创建新模板
|
||||
|
||||
else if($ac=='edit'&& !empty($id))
|
||||
{
|
||||
if(!empty($submit))
|
||||
{
|
||||
$title = $this->_request->getParam('title');
|
||||
$template = $this->_request->getParam('template');
|
||||
$body = $this->_request->getParam('body');
|
||||
|
||||
$sql = "update emailtext set subject='$title',template='$template',body='$body',ts_changed=now() where id='$id'";
|
||||
|
||||
try{
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('模板编辑成功');
|
||||
$this->_redirect('/admin/sys/emailtext');
|
||||
}
|
||||
}catch(Exception $e){
|
||||
$this->messenger->addMessage('模板编辑失败:'.$e->getMessage());
|
||||
$this->_redirect('/admin/sys/emailtext');
|
||||
}
|
||||
}else{
|
||||
$sql = "select * from emailtext where id='$id'";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetch();
|
||||
$this->view->info = $rows;
|
||||
$this->_helper->viewRenderer('emailtextedit');
|
||||
}
|
||||
|
||||
}//模板编辑
|
||||
|
||||
else if($ac=='test'&& !empty($id))
|
||||
{
|
||||
if(!empty($submit))
|
||||
{
|
||||
try{
|
||||
$subject = $this->_request->getParam('subject');
|
||||
$email = $this->_request->getParam('email');
|
||||
$body = $this->_request->getParam('body');
|
||||
|
||||
if(empty($subject) || empty($email))
|
||||
{
|
||||
$this->messenger->addMessage('请填写测试邮件发送信息');
|
||||
$this->_redirect('/admin/sys/emailtext/ac/test/id/'.$id);
|
||||
}
|
||||
|
||||
$mailtp=new EmailText($this->db,$this->_request->getParam('id'),array('user' => $this->_request->getParam('user')));
|
||||
$body = $mailtp->getBody();
|
||||
if($body === false)
|
||||
{
|
||||
$this->messenger->addMessage('模板加载失败');
|
||||
$this->_redirect('/admin/sys/emailtext/ac/test/id/'.$id);
|
||||
}
|
||||
|
||||
|
||||
$mail=new WestdcMailer($this->view->config->smtp);
|
||||
|
||||
$mail->setBodyText($body);
|
||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||
$mail->addTo($email);
|
||||
$mail->setSubject($subject);
|
||||
|
||||
if($mail->send()){
|
||||
$this->messenger->addMessage('测试邮件发送成功');
|
||||
$this->_redirect('/admin/sys/emailtext/ac/test/id/'.$id);
|
||||
}else{
|
||||
$this->messenger->addMessage('测试邮件发送失败');
|
||||
$this->_redirect('/admin/sys/emailtext/ac/test/id/'.$id);
|
||||
}
|
||||
}catch(Exception $e){
|
||||
$this->messenger->addMessage('测试邮件发送失败'.$e->getMessage());
|
||||
$this->_redirect('/admin/sys/emailtext/ac/test/id/'.$id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "select * from emailtext where id='$id'";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetch();
|
||||
$this->view->info = $rows;
|
||||
$this->_helper->viewRenderer('emailtexttest');
|
||||
}
|
||||
|
||||
}//模板测试
|
||||
|
||||
else if($ac=='help')
|
||||
{
|
||||
$this->_helper->viewRenderer('emailtexthelp');
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
try{
|
||||
$sql = "select id,subject,template,ts_created,ts_changed from emailtext order by ts_changed desc";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}catch (Exception $e){
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}//邮件模板管理首页
|
||||
|
||||
}//emailtextAction 邮件模板管理
|
||||
|
||||
function seekspaceAction()
|
||||
{
|
||||
set_time_limit(0);
|
||||
$submit = $this->_request->getParam('submit');
|
||||
if (!empty($submit))
|
||||
{
|
||||
$sql="select item_id from knl_article order by id desc";
|
||||
$row=$this->db->fetchRow($sql);
|
||||
try {
|
||||
$this->db->beginTransaction();
|
||||
$sql="insert into knl_article (item_id) select item_id from knl_dcvalue where dc_type_id=66 and text_value='Article' and item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="update knl_article k set title=t.text_value from (select text_value,item_id from knl_dcvalue where dc_type_id=64) as t where k.item_id=t.item_id and k.item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="update knl_article k set url=t.text_value from (select text_value,item_id from knl_dcvalue where dc_type_id=25) as t where k.item_id=t.item_id and k.item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="update knl_article k set publisher=t.text_value from (select text_value,item_id from knl_dcvalue where dc_type_id=39) as t where k.item_id=t.item_id and k.item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="update knl_article k set ts_issued=t.text_value from (select text_value,item_id from knl_dcvalue where dc_type_id=15) as t where k.item_id=t.item_id and k.item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="update knl_article k set ts_created=cast(t.text_value as timestamp without time zone) from (select text_value,item_id from knl_dcvalue where dc_type_id=12) as t where k.item_id=t.item_id and k.item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="update knl_article k set keywords[t.place]=t.text_value from (select text_value,item_id,place from knl_dcvalue where dc_type_id=57) as t where k.item_id=t.item_id and k.item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="insert into knl_keyword (keyword,item_id,place) select text_value,item_id,place from knl_dcvalue where dc_type_id=57 and item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$sql="insert into knl_author (author,item_id,place) select text_value,item_id,place from knl_dcvalue where dc_type_id=3 and item_id>".$row['item_id'];
|
||||
$this->db->query($sql);
|
||||
$this->db->query("delete from knl_keyword where item_id not in (select item_id from knl_article)");
|
||||
$this->db->query("delete from knl_author where item_id not in (select item_id from knl_article)");
|
||||
$this->db->commit();
|
||||
} catch(Exception $e) {
|
||||
$this->db->rollBack();
|
||||
$this->view->msg=$e->getMessage();
|
||||
}
|
||||
$this->view->msg='与文献平台同步成功!';
|
||||
}
|
||||
$sql="select (select count(*) from knl_article) as westdccount,(select count(*) from knl_dcvalue where dc_type_id=66 and text_value='Article') as seekcount";
|
||||
$this->view->count=$this->db->fetchRow($sql);
|
||||
}
|
||||
|
||||
function getmsgAction(){
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$msg = array();
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
if($user->usertype == "administrator")
|
||||
{
|
||||
include_once("message.php");
|
||||
$rs = message::getNew($this->db,$userid,"admin");
|
||||
echo Zend_Json::encode($rs);
|
||||
exit();
|
||||
}else{
|
||||
$msg['error'] = "您没有权限";
|
||||
echo Zend_Json::encode($msg);
|
||||
exit();
|
||||
}
|
||||
}else{
|
||||
$msg['error'] = "您没有权限";
|
||||
echo Zend_Json::encode($msg);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
function messageAction(){
|
||||
$do = $this->_request->getParam('do');
|
||||
$id = $this->_request->getParam('id');
|
||||
|
||||
if($do=='read' && !empty($id))
|
||||
{
|
||||
$this->_helper->viewRenderer('messageview');
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
if($user->usertype == "administrator")
|
||||
{
|
||||
include_once("message.php");
|
||||
$rs = message::getOne($this->db,$userid,$id);
|
||||
$this->view->info = $rs['info'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//读取所有消息
|
||||
else if($do=="listall")
|
||||
{
|
||||
$sql = "SELECT * FROM messages m
|
||||
LEFT JOIN messages_logs ml ON m.id=ml.mid
|
||||
ORDER BY m.sendtime DESC";
|
||||
$result = $this->db->query($sql);
|
||||
$rows = $result->fetchAll();
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}
|
||||
|
||||
//标记为已读
|
||||
else if($do=="close" && !empty($id))
|
||||
{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
include_once("message.php");
|
||||
$rs = message::read($this->db,$userid,$id);
|
||||
$this->_redirect('/admin/sys/message');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//标记为已处理(不再推送给其他管理员)
|
||||
else if($do=="over" && !empty($id))
|
||||
{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
if($user->usertype == "administrator")
|
||||
{
|
||||
include_once("message.php");
|
||||
$rs = message::over($this->db,$id);
|
||||
if($rs){
|
||||
echo "操作成功!";exit();
|
||||
}else{
|
||||
echo "操作失败!";exit();
|
||||
}
|
||||
}else{
|
||||
echo "非法操作!";exit();
|
||||
}
|
||||
}else{
|
||||
echo "非法操作!";exit();
|
||||
}
|
||||
}
|
||||
|
||||
//拉取新消息
|
||||
else
|
||||
{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
if($user->usertype == "administrator")
|
||||
{
|
||||
include_once("message.php");
|
||||
$rs = message::getNew($this->db,$userid,"admin");
|
||||
$this->view->totle = $rs['count'];
|
||||
$paginator = Zend_Paginator::factory($rs['rows']);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}
|
||||
}
|
||||
}//end
|
||||
|
||||
}//getmessageAction() 获取站内消息
|
||||
|
||||
//ftp测试
|
||||
function ftptestAction()
|
||||
{
|
||||
}
|
||||
|
||||
//区域管理
|
||||
function regionsAction()
|
||||
{
|
||||
include_once("data/Regions.php");
|
||||
include_once("helper/view.php");
|
||||
|
||||
$region = new Region($this->db);
|
||||
|
||||
$ac = $this->_getParam('ac');
|
||||
$id = $this->_getParam("id");
|
||||
|
||||
$RegionListener = new RegionListener();
|
||||
@$region->events()->attachAggregate($RegionListener);
|
||||
|
||||
if(empty($ac) || $ac == "index")
|
||||
{
|
||||
$filter = array();
|
||||
|
||||
$q = $this->_getParam('keyword');
|
||||
if(!empty($q))
|
||||
{
|
||||
$filter['q'] = $q;
|
||||
$this->view->keyword = $q;
|
||||
}
|
||||
|
||||
$data = $region->fetchRegion('all',$filter);
|
||||
view::addPaginator($data,$this,NULL,15);
|
||||
}
|
||||
|
||||
if($ac == "add" || $ac == "edit")
|
||||
{
|
||||
$this->_helper->viewRenderer('regions-add');
|
||||
$submit = $this->_getParam('submit');
|
||||
if(!empty($submit))
|
||||
{
|
||||
$this->view->data = $data = $this->_getParam("data");
|
||||
$s = $region->addRegion($data,$id);
|
||||
if($s === true)
|
||||
{
|
||||
$msg = "添加成功";
|
||||
if(!empty($id))
|
||||
$msg = "编辑成功";
|
||||
|
||||
view::Post($this,$msg,"/admin/sys/regions");
|
||||
return true;
|
||||
}else{
|
||||
if(is_string($s))
|
||||
{
|
||||
$this->view->error = view::Error($s);
|
||||
return true;
|
||||
}else{
|
||||
$this->view->error = view::Error("操作失败请重试");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(!empty($id))
|
||||
{
|
||||
$this->view->data = $region->get($id);
|
||||
}
|
||||
}
|
||||
}//添加
|
||||
|
||||
if($ac == "del")
|
||||
{
|
||||
$langid = $this->_getParam('langid');
|
||||
if(!empty($id) && !empty($langid))
|
||||
{
|
||||
$region->del($id,$langid);
|
||||
}else{
|
||||
$region->del($id);
|
||||
}
|
||||
view::Post($this,"删除成功",-1);
|
||||
}//删除
|
||||
|
||||
}//区域管理
|
||||
|
||||
function recoveryAction()
|
||||
{
|
||||
$pages=20;
|
||||
$ac=$this->_request->getParam('ac');
|
||||
if ($ac=='' || $ac=='online')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(t.filesize/1024/1024*100)/100 as filesize,
|
||||
t.filecount from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t on ds.id=t.dsid
|
||||
where s.status>4 and m.datatype=0 and ds.host='ftp1.westgis.ac.cn'
|
||||
ORDER BY m.id DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
$ac='online';
|
||||
} else if ($ac=='heihe')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(t.filesize/1024/1024*100)/100 as filesize,
|
||||
t.filecount from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t on ds.id=t.dsid
|
||||
left join datasource on datasource.uuid=m.uuid
|
||||
left join source on datasource.sourceid=source.id
|
||||
where s.status>4 and m.datatype=1 and ds.host='ftp1.westgis.ac.cn' and source.code='heihe'
|
||||
ORDER BY m.id DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
} else if ($ac=='water')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(t.filesize/1024/1024*100)/100 as filesize,
|
||||
t.filecount from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t on ds.id=t.dsid
|
||||
left join datasource on datasource.uuid=m.uuid
|
||||
left join source on datasource.sourceid=source.id
|
||||
where s.status>4 and m.datatype=1 and ds.host='ftp1.westgis.ac.cn' and source.code='water'
|
||||
ORDER BY m.title DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
} else if ($ac=='heihe1')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(t.filesize/1024/1024*100)/100 as filesize,
|
||||
t.filecount from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join datasource on datasource.uuid=m.uuid
|
||||
left join (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t on ds.id=t.dsid
|
||||
left join source on datasource.sourceid=source.id
|
||||
where s.status in (2,3,4) and ds.host='ftp1.westgis.ac.cn' and source.code='heihe'
|
||||
ORDER BY m.title DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
} else if ($ac=='hiwater')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(t.filesize/1024/1024*100)/100 as filesize,
|
||||
t.filecount from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t on ds.id=t.dsid
|
||||
left join datasource on datasource.uuid=m.uuid
|
||||
left join source on datasource.sourceid=source.id
|
||||
where ds.host='ftp1.westgis.ac.cn' and source.code='hiwater'
|
||||
ORDER BY m.title DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}else if ($ac=='westee')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(t.filesize/1024/1024*100)/100 as filesize,
|
||||
t.filecount from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t on ds.id=t.dsid
|
||||
where ds.host='ftp1.westgis.ac.cn' and m.uuid in (select uuid from westeemd)
|
||||
ORDER BY m.title DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}else if ($ac=='other')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(t.filesize/1024/1024*100)/100 as filesize,
|
||||
t.filecount from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t on ds.id=t.dsid
|
||||
where ds.host='ftp1.westgis.ac.cn' and m.uuid not in (select uuid from datasource) and m.uuid not in (select uuid from westeemd)
|
||||
ORDER BY m.title DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}
|
||||
$this->view->activeID="btn-".$ac;
|
||||
}
|
||||
|
||||
function problemAction()
|
||||
{
|
||||
$pages=20;
|
||||
$ac=$this->_request->getParam('ac');
|
||||
if ($ac=='' || $ac=='ref')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,m.citation,g.id as gid from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
left join geonetworkmetadata g on g.uuid=m.uuid
|
||||
where s.status>4 and m.citation like '%??%'
|
||||
ORDER BY m.id DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
$this->_helper->viewRenderer('problem-ref');
|
||||
$ac='ref';
|
||||
} else if ($ac=='file')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,m.filesize,ds.host,ds.path from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
where s.status>4 and ds.id not in (select distinct dsid from datafile)
|
||||
group by m.title,m.uuid,ds.host,ds.path,m.filesize
|
||||
ORDER BY m.title DESC;";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
} else if ($ac=='tiny')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||
floor(sum(datafile.filesize)/1024/1024*100)/100 as filesize,
|
||||
count(datafile.id) as filecount
|
||||
from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||
left join datasource on datasource.uuid=m.uuid
|
||||
left join datafile on ds.id=datafile.dsid
|
||||
left join source on datasource.sourceid=source.id
|
||||
where s.status>4 and ds.id in (select t.dsid from (select dsid,count(id) as filecount,sum(filesize) as filesize from datafile group by dsid) as t
|
||||
where t.filesize<1024*5)
|
||||
group by m.title,m.uuid,ds.host,ds.path
|
||||
ORDER BY m.title DESC;";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
} else if ($ac=='heihefund')
|
||||
{
|
||||
$sql = "SELECT m.title,m.uuid,g.id as gid
|
||||
from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
left join datasource on datasource.uuid=m.uuid
|
||||
left join source on datasource.sourceid=source.id
|
||||
left join mdfund mf on mf.uuid=m.uuid
|
||||
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||
where s.status>4 and source.code='heihe' and mf.fid is null
|
||||
ORDER BY m.title DESC;";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
$this->_helper->viewRenderer('problem-md');
|
||||
} else if ($ac=='noemail')
|
||||
{
|
||||
$sql = "SELECT distinct m.title,m.uuid,g.id as gid
|
||||
from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
left join role on role.uuid=m.uuid
|
||||
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||
where m.datatype=1 and s.status>4 and m.uuid not in (
|
||||
select role.uuid from role left join responsible res on role.resid=res.id
|
||||
where res.email is not null and role.role in ('resourceProvider','owner','pointOfContact','custodian')
|
||||
)
|
||||
ORDER BY m.title DESC;";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
$this->_helper->viewRenderer('problem-md');
|
||||
} else if ($ac=='unmoved')
|
||||
{
|
||||
$sql = "SELECT distinct m.title,m.uuid,g.id as gid
|
||||
from metadata m
|
||||
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||
left join dataset ds on ds.uuid=m.uuid
|
||||
where s.status>4 and ds.path like '%upload%'
|
||||
ORDER BY m.title DESC;";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($pages);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
$this->_helper->viewRenderer('problem-md');
|
||||
}
|
||||
$this->view->activeID="btn-".$ac;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
<?php
|
||||
class Admin_TestController extends Zend_Controller_Action
|
||||
{
|
||||
function preDispatch()
|
||||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
$this->_helper->layout->setLayout('administry');
|
||||
$this->wdb=Zend_Db::factory('Pdo_Pgsql', array('host'=> '210.77.68.252','username' => 'wlz','password' => 'glacier','dbname'=> 'new_geonetwork'));
|
||||
}
|
||||
function postDispatch()
|
||||
{
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
function indexAction()
|
||||
{
|
||||
//其他连接
|
||||
}
|
||||
|
||||
|
||||
//测试文献的下载链接是否正确
|
||||
function reftestAction()
|
||||
{
|
||||
$sql="select * from reference where link<>''";
|
||||
$rows=$this->db->query($sql);
|
||||
foreach($rows as $row)
|
||||
{
|
||||
if (substr($row['link'],0,1)=='/')
|
||||
{
|
||||
if (!file_exists("http://westdc.westgis.ac.cn".$row['link']))
|
||||
{
|
||||
$ref[]=$row;
|
||||
}
|
||||
} elseif (!file_exists($row['link'])) {
|
||||
$ref[]=$row;
|
||||
}
|
||||
}
|
||||
$this->view->ref=$ref;
|
||||
}
|
||||
|
||||
//检查DOI是否有重复
|
||||
function doiAction()
|
||||
{
|
||||
$sql="select doi,uuid,title from metadata where doi<>'' order by doi";
|
||||
$rows=$this->db->fetchAll($sql);
|
||||
$sql="select distinct(doi) from metadata where doi<>'' order by doi";
|
||||
$drows=$this->db->fetchAll($sql);
|
||||
$c=0;
|
||||
if (count($rows)!=count($drows))
|
||||
{
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
if ($row['doi']!=$drows[$k-$c]['doi'])
|
||||
{
|
||||
$c++;
|
||||
$doi[]=$rows[$k-1];
|
||||
$doi[]=$row;
|
||||
}
|
||||
}
|
||||
$this->view->doi=$doi;
|
||||
}
|
||||
}
|
||||
|
||||
//检查DOI是否有重复
|
||||
function nodoiwaterAction()
|
||||
{
|
||||
$sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and doi='' order by title";
|
||||
$this->view->rows=$this->db->fetchAll($sql);
|
||||
}
|
||||
|
||||
//检查source不符合要求
|
||||
function sourceAction()
|
||||
{
|
||||
$sql="select uuid,title,source from metadata where title ilike '黑河综合遥感联合试验%' and source=''";
|
||||
$this->view->rows=$this->db->fetchAll($sql);
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,441 +0,0 @@
|
|||
<?php
|
||||
class Admin_WatermdController extends Zend_Controller_Action
|
||||
{
|
||||
function preDispatch()
|
||||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
$this->_helper->layout->setLayout('administry');
|
||||
$this->wdb=Zend_Db::factory($this->view->config->geonetwork);
|
||||
set_time_limit(0);
|
||||
}
|
||||
function postDispatch()
|
||||
{
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
function indexAction()
|
||||
{
|
||||
//其他连接
|
||||
}
|
||||
|
||||
function replaceAction()
|
||||
{
|
||||
//use preg_replace to replace the string
|
||||
$form=new ReplaceForm();
|
||||
if ($this->_request->isPost()) {
|
||||
$formdata=$this->_request->getPost();
|
||||
$pattern=$formdata["pattern"];
|
||||
$form->populate($formdata);
|
||||
if (substr($pattern,0,1)!='/')
|
||||
{
|
||||
$pattern='/'.$pattern.'/m';
|
||||
}
|
||||
$replace=$formdata["replace"];
|
||||
if (isset($formdata["test"]))
|
||||
{
|
||||
$this->view->test=preg_replace($pattern,$replace,$formdata["source"]);
|
||||
} elseif (isset($formdata["submit"]))
|
||||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
$new_data=preg_replace($pattern,$replace,$row['data']);
|
||||
//防止正则错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
||||
$deal['uuid']=$row['uuid'];
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->form=$form;
|
||||
}
|
||||
|
||||
//替换关键词
|
||||
function keywordAction()
|
||||
{
|
||||
//use preg_replace to replace the string
|
||||
$form=new ReplaceForm();
|
||||
$form->pattern->setLabel('原关键词');
|
||||
$form->replace->setLabel('替换关键词');
|
||||
if ($this->_request->isPost()) {
|
||||
$formdata=$this->_request->getPost();
|
||||
$pattern=$formdata["pattern"];
|
||||
$form->populate($formdata);
|
||||
//if (substr($pattern,0,1)!='/')
|
||||
{
|
||||
$pattern='/\<keyword\>'.$pattern.'\<\/keyword\>/m';
|
||||
}
|
||||
$replace='<keyword>'.$formdata["replace"].'</keyword>';
|
||||
if (isset($formdata["test"]))
|
||||
{
|
||||
$this->view->test=preg_replace($pattern,$replace,$formdata["source"]);
|
||||
} elseif (isset($formdata["submit"]))
|
||||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
$new_data=preg_replace($pattern,$replace,$row['data']);
|
||||
//防止正则错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->form=$form;
|
||||
}
|
||||
|
||||
//替换标题和英文标题到数据引用中,以标题为准
|
||||
function citetitleAction()
|
||||
{
|
||||
$form=new ReplaceForm();
|
||||
$form->setElements(array($form->source,$form->test,$form->submit));
|
||||
|
||||
if ($this->_request->isPost()) {
|
||||
$formdata=$this->_request->getPost();
|
||||
$form->populate($formdata);
|
||||
if (isset($formdata["test"]))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($formdata['source']);
|
||||
$root = $dom->getElementsByTagName('Metadata');
|
||||
$xpath = new DOMXpath($dom);
|
||||
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
|
||||
$title=$title_key->item(0)->nodeValue;
|
||||
$title_en_path=$xpath->query("//Metadata/dataIdInfo/idCitation/resAltTitle");
|
||||
$title_en=$title_en_path->item(0)->nodeValue;
|
||||
$otherCitDet=$xpath->query("//Metadata/dataIdInfo/idCitation/otherCitDet");
|
||||
$other=$otherCitDet->item(0)->nodeValue;
|
||||
$other_cn=mb_strstr($other,'[',true);
|
||||
$title_o=mb_strstr($other_cn,'.',false);
|
||||
$title_ol=substr($title_o,1,-4);
|
||||
$title_old=mb_strstr($title_ol,'.',true);
|
||||
$other_eng=mb_strstr($other,'[',false);
|
||||
$titlen_o=mb_strstr($other_eng,'.',false);
|
||||
$titlen_ol=substr($titlen_o,1,-4);
|
||||
$titlen_old=mb_strstr($titlen_ol,',',true);
|
||||
$new_other=str_replace(array($title_old,$titlen_old),array($title,$title_en),$other);
|
||||
$otherCitDet->item(0)->nodeValue=$new_other;
|
||||
$this->view->test= $dom->saveXML($root->item(0));
|
||||
} elseif (isset($formdata["submit"]))
|
||||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$uuid = $row['uuid'];
|
||||
$root = $dom->getElementsByTagName('Metadata');
|
||||
$xpath = new DOMXpath($dom);
|
||||
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
|
||||
$title=$title_key->item(0)->nodeValue;
|
||||
$title_en_path=$xpath->query("//Metadata/dataIdInfo/idCitation/resAltTitle");
|
||||
$title_en=$title_en_path->item(0)->nodeValue;
|
||||
$otherCitDet=$xpath->query("//Metadata/dataIdInfo/idCitation/otherCitDet");
|
||||
$other=$otherCitDet->item(0)->nodeValue;
|
||||
$other_cn=mb_strstr($other,'[',true);
|
||||
$title_o=mb_strstr($other_cn,'.',false);
|
||||
$title_ol=substr($title_o,1,-4);
|
||||
$title_old=mb_strstr($title_ol,'.',true);
|
||||
$other_eng=mb_strstr($other,'[',false);
|
||||
$titlen_o=mb_strstr($other_eng,'.',false);
|
||||
$titlen_ol=substr($titlen_o,1,-4);
|
||||
$titlen_old=mb_strstr($titlen_ol,',',true);
|
||||
$new_other=str_replace(array($title_old,$titlen_old),array($title,$title_en),$other);
|
||||
$otherCitDet->item(0)->nodeValue=$new_other;
|
||||
$new_data = $dom->saveXML($root->item(0));
|
||||
//防止错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->form=$form;
|
||||
}
|
||||
|
||||
//文件大小处理
|
||||
function filesizeAction()
|
||||
{
|
||||
$form=new ReplaceForm();
|
||||
$form->pattern->setLabel('文件大小');
|
||||
$form->setElements(array($form->pattern,$form->source,$form->test,$form->submit));
|
||||
|
||||
if ($this->_request->isPost()) {
|
||||
$formdata=$this->_request->getPost();
|
||||
$form->populate($formdata);
|
||||
if (isset($formdata["test"]))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($formdata['source']);
|
||||
$root = $dom->getElementsByTagName('Metadata');
|
||||
$xpath = new DOMXpath($dom);
|
||||
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
|
||||
$title=$title_key->item(0)->nodeValue;
|
||||
$transize_path=$xpath->query("//Metadata/distInfo/distTranOps/transSize");
|
||||
$transize_path->item(0)->nodeValue=$formdata['pattern'];
|
||||
$this->view->test= $dom->saveXML($root->item(0));
|
||||
} elseif (isset($formdata["submit"]))
|
||||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
$sql="select update_filesize();";
|
||||
$this->db->exec($sql);
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$root = $dom->getElementsByTagName('Metadata');
|
||||
$uuid = $row['uuid'];
|
||||
$xpath = new DOMXpath($dom);
|
||||
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
|
||||
$title=$title_key->item(0)->nodeValue;
|
||||
$transize_path=$xpath->query("//Metadata/distInfo/distTranOps/transSize");
|
||||
$sql="select filesize from metadata where uuid = ?";
|
||||
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$row=$this->db->fetchRow($sql,array($uuid));
|
||||
$transize_path->item(0)->nodeValue=$row->filesize;
|
||||
$new_data = $dom->saveXML();
|
||||
//防止错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid='$uuid'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->form=$form;
|
||||
}
|
||||
|
||||
//修改限制使用说明
|
||||
//useLimit可以是多项的
|
||||
function uselimitAction()
|
||||
{
|
||||
$form=new ReplaceForm();
|
||||
$form->pattern->setLabel('使用声明');
|
||||
$form->setElements(array($form->pattern,$form->source,$form->test,$form->submit));
|
||||
|
||||
if ($this->_request->isPost()) {
|
||||
$formdata=$this->_request->getPost();
|
||||
$form->populate($formdata);
|
||||
$limit_text=$formdata['pattern'];
|
||||
if (isset($formdata["test"]))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($formdata['source']);
|
||||
$root = $dom->getElementsByTagName('Metadata');
|
||||
$xpath = new DOMXpath($dom);
|
||||
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
|
||||
$title=$title_key->item(0)->nodeValue;
|
||||
$uselimits=$xpath->query("//Metadata/dataIdInfo/resConst/Consts/useLimit");
|
||||
$do_uselimit=1;
|
||||
foreach($uselimits as $limit)
|
||||
{
|
||||
//已经有声明,则不需要处理
|
||||
if ($limit->nodeValue==$limit_text || (strlen($limit->nodeValue)>3))
|
||||
$do_uselimit=0;
|
||||
}
|
||||
if ($do_uselimit==1)
|
||||
{
|
||||
$new_uselimit=$dom->createElement('useLimit',$limit_text);
|
||||
$new_resconst=$dom->createElement('resConst');
|
||||
$new_const=$dom->createElement('Consts');
|
||||
$new_const->appendChild($new_uselimit);
|
||||
$new_resconst->appendChild($new_const);
|
||||
$desckey=$xpath->query("//Metadata/dataIdInfo/descKeys")->item(0);
|
||||
$resconst=$xpath->query("//Metadata/dataIdInfo/resConst")->item(0);
|
||||
if ($resconst)
|
||||
$resconst->parentNode->insertBefore($new_resconst,$resconst);
|
||||
else
|
||||
$desckey->parentNode->insertBefore($new_resconst,$desckey);
|
||||
$new_data=$dom->saveXML();
|
||||
}
|
||||
$this->view->test= $new_data;
|
||||
} elseif (isset($formdata["submit"]))
|
||||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$root = $dom->getElementsByTagName('Metadata');
|
||||
$uuid = $row['uuid'];
|
||||
$xpath = new DOMXpath($dom);
|
||||
$title_key=$xpath->query("//Metadata/dataIdInfo/idCitation/resTitle");
|
||||
$title=$title_key->item(0)->nodeValue;
|
||||
$uselimits=$xpath->query("//Metadata/dataIdInfo/resConst/Consts/useLimit");
|
||||
$do_uselimit=1;
|
||||
foreach($uselimits as $limit)
|
||||
{
|
||||
//已经有声明,则不需要处理
|
||||
if ($limit->nodeValue==$limit_text || (strlen($limit->nodeValue)>3))
|
||||
$do_uselimit=0;
|
||||
}
|
||||
if ($do_uselimit==1)
|
||||
{
|
||||
$new_uselimit=$dom->createElement('useLimit',$limit_text);
|
||||
$new_resconst=$dom->createElement('resConst');
|
||||
$new_const=$dom->createElement('Consts');
|
||||
$new_const->appendChild($new_uselimit);
|
||||
$new_resconst->appendChild($new_const);
|
||||
$desckey=$xpath->query("//Metadata/dataIdInfo/descKeys")->item(0);
|
||||
$resconst=$xpath->query("//Metadata/dataIdInfo/resConst")->item(0);
|
||||
if ($resconst)
|
||||
$resconst->parentNode->insertBefore($new_resconst,$resconst);
|
||||
else
|
||||
$desckey->parentNode->insertBefore($new_resconst,$desckey);
|
||||
$new_data=$dom->saveXML();
|
||||
//防止错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->form=$form;
|
||||
}
|
||||
|
||||
//联系人信息替换
|
||||
function contactAction()
|
||||
{
|
||||
if ($this->_request->isPost()) {
|
||||
$formdata=$this->_request->getPost();
|
||||
if (isset($formdata["test"]))
|
||||
{
|
||||
$this->view->test=$this->contactReplace($formdata["testxml"],$formdata);
|
||||
} elseif (isset($formdata["submit"]))
|
||||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n' and data like '%".$formdata['oldname']."%'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $row)
|
||||
{
|
||||
//do the replace
|
||||
$new_data=$this->contactReplace($row["data"],$formdata);
|
||||
//防止错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
||||
$deal['uuid']=$row['uuid'];
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->formdata=$formdata;
|
||||
}
|
||||
}
|
||||
|
||||
private function contactReplace($xml,$replace)
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($xml);
|
||||
$xpath = new DOMXpath($dom);
|
||||
$contacts=$xpath->query('//rpIndName');
|
||||
foreach($contacts as $contact)
|
||||
{
|
||||
if ($contact->nodeValue==$replace['oldname'])
|
||||
{
|
||||
$newrpIndName=$dom->createElement('rpIndName',$replace['name']);
|
||||
$newrpOrgName=$dom->createElement('rpOrgName',$replace['unit']);
|
||||
$newrpCntInfo=$dom->createElement('rpCntInfo');
|
||||
$newcntPhone=$dom->createElement('cntPhone');
|
||||
$newrpCntInfo->appendChild($newcntPhone);
|
||||
$newvoiceNum=$dom->createElement('voiceNum',$replace['voicenum']);
|
||||
$newcntPhone->appendChild($newvoiceNum);
|
||||
$newcntAddress=$dom->createElement('cntAddress');
|
||||
$newrpCntInfo->appendChild($newcntAddress);
|
||||
$newdelPoint=$dom->createElement('delPoint',$replace['delpoint']);
|
||||
$newcntAddress->appendChild($newdelPoint);
|
||||
$newcity=$dom->createElement('city',$replace['city']);
|
||||
$newcntAddress->appendChild($newcity);
|
||||
$newarea=$dom->createElement('adminArea',$replace['adminarea']);
|
||||
$newcntAddress->appendChild($newarea);
|
||||
$newpostCode=$dom->createElement('postCode',$replace['postcode']);
|
||||
$newcntAddress->appendChild($newpostCode);
|
||||
$newcountry=$dom->createElement('country',$replace['country']);
|
||||
$newcntAddress->appendChild($newcountry);
|
||||
$neweMailAdd=$dom->createElement('eMailAdd',$replace['email']);
|
||||
$newcntAddress->appendChild($neweMailAdd);
|
||||
|
||||
$rporg=$xpath->query('rpOrgName',$contact->parentNode);
|
||||
$contact->parentNode->removeChild($rporg->item(0));
|
||||
$rpcnt=$xpath->query('rpCntInfo',$contact->parentNode);
|
||||
$contact->parentNode->removeChild($rpcnt->item(0));
|
||||
|
||||
$contact->parentNode->insertBefore($newrpIndName,$contact);
|
||||
$contact->parentNode->insertBefore($newrpOrgName,$contact);
|
||||
$contact->parentNode->insertBefore($newrpCntInfo,$contact);
|
||||
|
||||
$contact->parentNode->removeChild($contact);
|
||||
}
|
||||
}
|
||||
return $dom->saveXML();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Zend_View_Helper_BaseUrl
|
||||
{
|
||||
function baseUrl()
|
||||
{
|
||||
$fc = Zend_Controller_Front::getInstance();
|
||||
return $fc->getBaseUrl();
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
class Zend_View_Helper_breadcrumb extends Zend_View_Helper_Placeholder_Container_Standalone
|
||||
{
|
||||
public function breadcrumb ($title = null, $setType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND)
|
||||
{
|
||||
if ($title) {
|
||||
if ($setType == Zend_View_Helper_Placeholder_Container_Abstract::SET) {
|
||||
$this->set($title);
|
||||
} elseif ($setType == Zend_View_Helper_Placeholder_Container_Abstract::PREPEND) {
|
||||
$this->prepend($title);
|
||||
} else {
|
||||
$this->append($title);
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function toString ($indent = null)
|
||||
{
|
||||
$indent = (null !== $indent) ? $this->_getWhitespace($indent) : $this->getIndent();
|
||||
$items = array();
|
||||
foreach ($this as $item) {
|
||||
$items[] = $item;
|
||||
}
|
||||
$separator = $this->_escape($this->getSeparator());
|
||||
if (empty($separator)) $separator='->';
|
||||
return $indent . implode($separator, $items);
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
<!-- Page footer -->
|
||||
<footer id="bottom">
|
||||
<div class="wrapper">
|
||||
<nav>
|
||||
<a href="/about/contact" >联系我们</a> ·
|
||||
<a href="/about/terms">使用条款和免责申明</a> ·
|
||||
<a href="#">Reports</a> ·
|
||||
<a href="#">Users</a> ·
|
||||
<a href="#">Media</a> ·
|
||||
<a href="#">Events</a> ·
|
||||
<a href="#">Newsletter</a> ·
|
||||
<a href="#">Settings</a>
|
||||
</nav>
|
||||
<p>Copyright © 2006-2011 <b>中国西部环境与生态科学数据中心</b> | 陇ICP备05000491号</p>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- End of Page footer -->
|
||||
|
||||
<!-- Animated footer -->
|
||||
<footer id="animated">
|
||||
<ul>
|
||||
<li><a href="#">Dashboard</a></li>
|
||||
<li><a href="#">Content</a></li>
|
||||
<li><a href="#">Reports</a></li>
|
||||
<li><a href="#">Users</a></li>
|
||||
<li><a href="#">Media</a></li>
|
||||
<li><a href="#">Events</a></li>
|
||||
<li><a href="#">Newsletter</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
</ul>
|
||||
</footer>
|
||||
<!-- End of Animated footer -->
|
||||
|
||||
<!-- Scroll to top link -->
|
||||
<a href="#" id="totop">^ scroll to top</a>
|
|
@ -1,84 +0,0 @@
|
|||
<?php
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$uname=$user->username;
|
||||
}
|
||||
?>
|
||||
<!-- Header -->
|
||||
<header id="top">
|
||||
<div class="wrapper">
|
||||
<!-- Title/Logo - can use text instead of image -->
|
||||
<div id="title"><span>中国西部环境与生态科学数据中心 - 管理中心</span></div>
|
||||
<!-- Top navigation -->
|
||||
<div id="topnav">
|
||||
<a href="#"><img class="avatar" SRC="/static/img/user_32.png" alt="" /></a>
|
||||
Logged in as <b><?php echo $uname;?></b>
|
||||
<span>|</span> <a href="/account/edit">设置</a>
|
||||
<span>|</span> <a href="/account/logout">注销</a><br />
|
||||
<small>You have <a href="#" class="high"><b>1</b> new message!</a></small>
|
||||
</div>
|
||||
<!-- End of Top navigation -->
|
||||
<!-- Main navigation -->
|
||||
<nav id="menu">
|
||||
<ul class="sf-menu">
|
||||
<li><a href="/"><span>网站首页</span></a></li>
|
||||
<li><a href="/admin"><span>后台首页</span></a></li>
|
||||
<li><a href="/admin/data"><span>数据管理</span></a>
|
||||
<ul>
|
||||
<li><a href="/admin/data/md">元数据管理</a></li>
|
||||
<li><a href="/admin/data/comment">数据反馈管理</a></li>
|
||||
<li><a href="/admin/data/reference">数据文献关联管理</a></li>
|
||||
<li><a href="/admin/data/import">上传元数据文件</a></li>
|
||||
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li>
|
||||
<li><a href="/admin/data/datafileimport">导入数据目录</a></li>
|
||||
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
|
||||
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
|
||||
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
|
||||
<li><a href="/admin/data/feature">特色推荐</a></li>
|
||||
<li><a href="/admin/data/source">项目来源管理</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/admin/down"><span>申请管理</span></a>
|
||||
<ul>
|
||||
<li><a href="/admin/down/offlineapp">离线数据申请管理</a></li>
|
||||
<li><a href="/admin/down/offline">离线数据服务记录</a></li>
|
||||
<li><a href="/admin/down/fixoffline">手动同步离线申请用户与网站帐号</a></li>
|
||||
<li><a href="/admin/down/online">在线数据下载记录(从20110908开始)</a></li>
|
||||
<li><a href="/admin/down/user">用户下载记录</a></li>
|
||||
<li><a href="/admin/down/data">数据下载记录</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/admin/user"><span>用户管理</span></a>
|
||||
<ul>
|
||||
<li><a href="/admin/user/">用户管理首页</a></li>
|
||||
<li><a href="/admin/user/list">普通用户列表</a></li>
|
||||
<li><a href="/admin/user/adminlist">管理员列表</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/admin/stat"><span>统计数据</span></a>
|
||||
<ul>
|
||||
<li><a href="/admin/stat/">统计概况</a></li>
|
||||
<li><a href="/admin/stat/awstatsweb">awstats web统计</a></li>
|
||||
<li><a href="/admin/stat/awstatsftp">awstats ftp统计</a></li>
|
||||
<li><a href="/admin/stat/webalizer">webalizer统计</a></li>
|
||||
<li><a href="/admin/stat/water">WATER项目</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- 数据统计 -->
|
||||
<li id="nav_news"><a href="/admin/news"><span>新闻中心</span></a></li>
|
||||
<!-- 新闻中心 -->
|
||||
<li id="nav_sys">
|
||||
<a href="/admin/sys"><span>系统管理</span></a>
|
||||
</li>
|
||||
<!-- 系统管理 -->
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- End of Main navigation -->
|
||||
<!-- Aside links -->
|
||||
<aside><b>简体中文</b> · <a href="#">English</a></aside>
|
||||
<!-- End of Aside links -->
|
||||
</div>
|
||||
</header>
|
||||
<!-- End of Header -->
|
|
@ -1,68 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>数据上传</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
|
||||
<script src='/static/js/jquery-1.7.2.min.js' type="text/javascript"></script>
|
||||
<script type="text/javascript" src="/static/js/uploadify/swfobject.js"></script>
|
||||
<script type="text/javascript" src="/static/js/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.colorbox-min.js"></script>
|
||||
<link href="/css/author.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/js/uploadify/uploadify.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<link href="/css/colorbox.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="wapper">
|
||||
<form id="fileUpdate" method="post">
|
||||
<p>注:要更新的文件只能选择一个<br />
|
||||
<ul id="datalist"></ul>
|
||||
<input id="file_upload" name="Filedata" type="file" />
|
||||
<input type="button" class="btn btn-small btn-green" onclick="$('#file_upload').uploadifyUpload();" value="更改" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#file_upload').uploadify({
|
||||
'uploader' : '/static/js/uploadify/uploadify.swf',
|
||||
'scriptData': {'PHPSESSID' : '<?php echo session_id(); ?>','submit':'1'},
|
||||
'script' : '/admin/data/attachments/attupdate/<?php echo $this->id ?>',
|
||||
'folder' : '/uploads',
|
||||
'multi' : false,
|
||||
'auto' : false,
|
||||
'displayData' : 'speed',
|
||||
'buttonImg' : '/static/js/uploadify/selectfile.gif',
|
||||
'onComplete' : function(event, ID, fileObj, response, data) {
|
||||
var obj = jQuery.parseJSON(response);
|
||||
var html;
|
||||
if(obj.error=='')
|
||||
{html = obj.html;}else{html = obj.error;}
|
||||
$('<li/>', {
|
||||
"id":'uploadedItem_'+obj.attid,
|
||||
"class":'uploadifyQueueItem',
|
||||
"html": html
|
||||
}).appendTo('#datalist');
|
||||
if(obj.ok!=null)
|
||||
{
|
||||
Alert('文件修改成功!');
|
||||
setTimeout("parent.$.fn.colorbox.close();parent.window.location.href=parent.window.location.href;",2000);
|
||||
}
|
||||
},
|
||||
'onError' : function (event,ID,fileObj,errorObj) {
|
||||
alert(errorObj.type + ' Error: ' + errorObj.info);
|
||||
}
|
||||
});
|
||||
});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('数据管理');
|
||||
$this->headScript()->appendFile('/static/js/jquery-1.7.2.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div><a href="/admin/data/attachments/add/1">上传新附件</a> | <a href="attachments/search/my">查看我的附件</a></div>
|
||||
|
||||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<ul>
|
||||
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<form method="get" action="/admin/data/md/att/1/addatts/1">
|
||||
<table class="stylized">
|
||||
<thead><tr>
|
||||
<?php
|
||||
if(!empty($this->uuid))
|
||||
echo '<th width="40">选择</th>';
|
||||
?>
|
||||
<th width="50">ID</th>
|
||||
<th width='100'>上传文件名</th>
|
||||
<th width='80'>类型</th>
|
||||
<th width='80'>大小</th>
|
||||
<th width='80'>下载次数</th>
|
||||
<th width='150'>上传时间</th>
|
||||
<th width="150">操作</th>
|
||||
</tr></thead>
|
||||
<tbody id="list">
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr id="att_<?php echo $item['id'];?>">
|
||||
<?php
|
||||
if(!empty($this->uuid))
|
||||
echo '<td><input type="checkbox" value="'.$item['id'].'" name="ids[]" /></td>';
|
||||
?>
|
||||
<td><?php echo $item['id'];?></td>
|
||||
<td><?php echo $item['realname'] ;?></td>
|
||||
<td><?php
|
||||
if($item['filetype']=='image') echo '图片' ;
|
||||
if($item['filetype']=='file') echo '文件' ;
|
||||
if($item['filetype']=='media') echo '多媒体' ;
|
||||
if($item['filetype']=='reviewatt') echo '评审附件' ;
|
||||
if($item['filetype']=='md') echo "数据文件";
|
||||
if($item['filetype']=='literature')echo "文献";
|
||||
if($item['filetype']=='document') echo "文档";
|
||||
?></td>
|
||||
<td><?php if($item['filesize']<1048576) echo round(($item['filesize']/1024),2).'KB'; else echo round(($item['filesize']/1024/1024),2).'MB'; ?></td>
|
||||
<td><?= $item['downtimes']; ?></td>
|
||||
<td><?= date('Y-m-d H:i:s',strtotime($item['ts_created'])); ?></td>
|
||||
<td>
|
||||
<a href="/admin/data/attachments/edit/<?= $item['id']; ?>">编辑</a> |
|
||||
<a href="javascript:delatt(<?= $item['id']; ?>);" onclick="return confirm('是否确定删除该附件?')">删除</a> |
|
||||
<a href="/service/attach/id/<?= $item['id']; ?>">下载</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
if(!empty($this->uuid))
|
||||
echo '<input type="hidden" name="uuid" value="'.$this->uuid.'" /><input type="hidden" name="submit" value="1" /><input type="submit" value="将已选择的附件添加到《'.$this->mdtitle.'》" />';
|
||||
?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<script>
|
||||
function delatt(id){
|
||||
$.ajax({
|
||||
'type': "POST",
|
||||
'url': "/admin/data/attachments/",
|
||||
'data': 'delete='+id,
|
||||
'success': function(data){
|
||||
if(data==null){Alert('遇到错误,请重试');return false;}
|
||||
if(data.error!=null){Alert(data.error);return false;}
|
||||
if(data.status==1){$('#att_'+id).fadeOut("slow");}
|
||||
},
|
||||
'beforeSend':function(){},
|
||||
'complete':function(){},
|
||||
'timeout': 20000,
|
||||
'dataType': 'json',
|
||||
'error': function(){Alert('处理中出现问题,请重试');}
|
||||
});
|
||||
}
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||
}
|
||||
$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})
|
||||
</script>
|
|
@ -1,116 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('数据管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,"uploadify");
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
<div class="ctrlplan">
|
||||
<a href="/admin/data/md/att/1/uuid/<?php echo $this->uuid;?>">返回元数据附件列表</a>
|
||||
<a href="/data/<?php echo $this->uuid; ?>">查看元数据</a>
|
||||
<a href="/admin/data/attachments/">返回附件管理</a>
|
||||
</div>
|
||||
|
||||
<form action="#" method="POST" enctype='multipart/form-data'>
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
|
||||
<p>注:可选择多个文件<br />
|
||||
<div id="datalist">
|
||||
</div>
|
||||
<input id="file_upload" name="Filedata" type="file" />
|
||||
</p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
var _this = {
|
||||
SessionID : '<?php echo session_id(); ?>'
|
||||
};
|
||||
var uploader;
|
||||
var param;
|
||||
param = {
|
||||
"PHPSESSID" : _this.SessionID,
|
||||
"multi" : 'yes'
|
||||
};
|
||||
$(function() {
|
||||
$('#file_upload').uploadify({
|
||||
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||
'uploader' : '/admin/data/upload/<?php if(!empty($this->uuid)) echo "uuid/".$this->uuid; ?>',
|
||||
'multi' : true,
|
||||
'auto' : true,
|
||||
'fileTypeExts' : '*',
|
||||
'onUploadSuccess' : function(file, data, response) {
|
||||
upload.onsuccess(file, data, response);
|
||||
},
|
||||
'onUploadStart' : function(file) {
|
||||
$('#file_upload').uploadify('settings','formData',param);
|
||||
}
|
||||
});
|
||||
});
|
||||
var upload = {
|
||||
onsuccess : function(file, data, response){
|
||||
_data = $.parseJSON(data);
|
||||
if(!$.isEmptyObject(_data.error))
|
||||
{
|
||||
alert(_data.error);
|
||||
}else{
|
||||
$('#datalist').append(upload.makeFileHtml(_data));
|
||||
}
|
||||
},
|
||||
makeFileHtml : function(data){
|
||||
return '<div class="alert alert-success">'
|
||||
+ '<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile('+data.id+')"><i class="icon-trash icon-white"></i></button>'
|
||||
+ '<a href="/service/attach/id/' + data.id + '">' +data.realname + '</a>'
|
||||
+'<input type="hidden" name="attid" value="'+data.id+'"></input>'
|
||||
+'</div>';
|
||||
},
|
||||
deleteFile : function(id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/attachments/',
|
||||
'data':'uuid=<?php echo $this->uuid?>&mdattdel='+id,
|
||||
'success':function(data){
|
||||
if(typeof(data) == 'undefined')
|
||||
{
|
||||
alert("数据源错误,请联系管理员");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!$.isEmptyObject(data.error))
|
||||
{
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
alert('附件删除出错');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.getJSON("/admin/data/getatts/uuid/<?php echo $this->uuid;?>", function(data) {
|
||||
if(data)
|
||||
{
|
||||
$.each(data, function(key, val) {
|
||||
$('#datalist').append(upload.makeFileHtml(val));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,102 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->headScript()->appendFile('/static/js/jquery-1.7.2.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css');
|
||||
$this->headScript()->appendFile('/static/js/uploadify/swfobject.js');
|
||||
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
|
||||
$this->breadcrumb('数据管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ctrlplan">
|
||||
<a href="/admin/data/md/att/1/uuid/<?php echo $this->uuid;?>/addatts/1/mdtitle/<?php echo $this->mdtitle ;?>">为此元数据选择附件</a>
|
||||
<a href="/admin/data/attachments/add/1/uuid/<?php echo $this->uuid;?>">为此元数据添加附件</a>
|
||||
<a href="/data/<?php echo $this->uuid; ?>">查看元数据</a>
|
||||
</div>
|
||||
|
||||
<table class="stylized">
|
||||
<thead><tr>
|
||||
<th width='250'>文件名</th>
|
||||
<th width='80'>类型</th>
|
||||
<th width='80'>大小</th>
|
||||
<th width='80'>下载次数</th>
|
||||
<th width='150'>上传时间</th>
|
||||
<th width="200">操作</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($this->atts as $v)
|
||||
{
|
||||
if($v['filesize']<1048576) $v['filesize'] = round(($v['filesize']/1024),2).'KB'; else $v['filesize'] = round(($v['filesize']/1024/1024),2).'MB';
|
||||
echo '
|
||||
<tr id="att_'.$v['id'].'">
|
||||
<td>'.$v['realname'].'</td>
|
||||
<td>'.$v['filetype'].'</td>
|
||||
<td>'.$v['filesize'].'</td>
|
||||
<td>'.$v['downtimes'].'</td>
|
||||
<td>'.date('Y-m-d H:i:s',strtotime($v['ts_created'])).'</td>
|
||||
<td>
|
||||
<a href="/admin/data/attachments/attupdate/'.$v['id'].'" class="iframe">更新文件</a>
|
||||
<a href="javascript:;" onclick="delmdatt('.$v['id'].')">从此元数据中移除</a>
|
||||
<a href="/service/attach/id/'.$v['id'].'">下载</a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
</div>
|
||||
<div style="display:none;">
|
||||
<form id="fileUpdate" method="post">
|
||||
<input type="hidden" id="id" name="id" value="" />
|
||||
<p>注:要更新的文件只能选择一个<br />
|
||||
<ul id="datalist"></ul>
|
||||
<input id="file_upload" name="Filedata" type="file" />
|
||||
<input type="button" class="btn btn-small btn-green" onclick="$('#file_upload').uploadifyUpload();" value="更改" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
function delmdatt(id){
|
||||
$.ajax({
|
||||
'type': "POST",
|
||||
'url': "/admin/data/attachments/",
|
||||
'data': 'uuid=<?php echo $this->uuid?>&mdattdel='+id,
|
||||
'success': function(data){
|
||||
if(data==null){Alert('遇到错误,请重试');return false;}
|
||||
if(data.error!=null){Alert(data.error);return false;}
|
||||
if(data.status==1){$('#att_'+id).fadeOut("slow");}
|
||||
},
|
||||
'beforeSend':function(){},
|
||||
'complete':function(){},
|
||||
'timeout': 20000,
|
||||
'dataType': 'json',
|
||||
'error': function(){Alert('处理中出现问题,请重试');}
|
||||
});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"50%", height:"50%"});
|
||||
$(".inline").colorbox({inline:true,'innerWidth':'50%','innerHeight':'50%'});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,101 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据作者管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/author/ac/datas">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li id="list_<?php echo $item['id'];?>">
|
||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </p>
|
||||
<p>
|
||||
<?php if ($item['c']) : ?>
|
||||
作者数量 :<span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span> | <a href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>/window/iframe" class="iframe">作者管理</a> |
|
||||
<?php endif; ?>
|
||||
<span id="addauthor_<?php echo $item['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">添加作者</a></span>
|
||||
<?php if($item['c']):?>
|
||||
| <span id="sendmail_<?php echo $item['id'];?>"><a href="javascript:;" onclick="SendMail('<?php echo $item['uuid']; ?>')">发邮件</a></span>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
function AddAuthor(id,uuid){
|
||||
$('#addauthor_'+id).html('用户名:<input type="text" id="authorInp_'+id+'"/><button class="btn btn-green" onclick="addAuthor('+id+',\''+uuid+'\')">添加</button>');
|
||||
}
|
||||
function addAuthor(id,uuid){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/author',
|
||||
'data':'ac=add&uuid='+uuid+'&username='+$('#authorInp_'+id).val(),
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.added)!='undefined')
|
||||
{$('#addauthor_'+id).html('<a href="javascript:;" onclick="AddAuthor('+id+',\''+uuid+'\')">添加作者</a>');}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
});
|
||||
}
|
||||
function SendMail(uuid){
|
||||
$('#sendmail_'+id).html('');
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,101 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>作者管理</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
|
||||
<script src='/static/js/jquery-1.7.2.min.js' type="text/javascript"></script>
|
||||
<script type="text/javascript" src="/js/jquery.colorbox-min.js"></script>
|
||||
<link href="/css/author.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/js/uploadify/uploadify.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<link href="/css/colorbox.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
#loading{margin:0px;border:none;height:50px;width:98%;background:url(/static/img/colorbox-images/loading.gif) center center no-repeat;display:none;position:absolute;left:0px;top:0px;overflow:hidden;background:#ccc;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="warpper">
|
||||
<div id="loading" class="info info-box"></div>
|
||||
<div id="datalist">
|
||||
<ul>
|
||||
<?php
|
||||
if(isset($this->authors))
|
||||
{
|
||||
foreach($this->authors as $v)
|
||||
{
|
||||
?>
|
||||
<li id="author_<?php echo $v['id'] ;?>">
|
||||
<p><?php echo $v['realname']; ?> [ <?php echo $v['username']; ?> ]</p>
|
||||
<p><span id="status_<?php echo $v['id'] ;?>"><?php if($v['status']==1) {echo "已认证";} if($v['status']==0) {echo "已申请";} if($v['status']==-1) {echo "已拒绝";} ?></span> |
|
||||
<a href="javascript:;" onclick="remove(<?php echo $v['id'] ;?>)">移除该作者</a>
|
||||
<span id="statusChange_<?php echo $v['id'] ;?>"><?php if($v['status']<1) {?> <a href="javascript:;" onclick="update(<?php echo $v['id'] ;?>)">认证该用户</a> <?php }?></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul></div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
function update(id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/author/',
|
||||
'data':'ac=update&id='+id,
|
||||
'success':function(data){
|
||||
if (data!=null)
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(data.msg!=null)
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.updated)!='undefined')
|
||||
{$('#status_'+data.updated).html('已认证');$('#statusChange_'+data.updated).html('');}
|
||||
}else{
|
||||
Alert('处理中出现错误');
|
||||
}
|
||||
},
|
||||
'timeout': 30000
|
||||
});
|
||||
}
|
||||
function remove(id){
|
||||
if(confirm('确实要删除吗?')==false)
|
||||
{return false;}
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:'/admin/data/author',
|
||||
data:'ac=del&id='+id,
|
||||
success:function(data){
|
||||
if (data!=null)
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#author_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
|
||||
}else{
|
||||
Alert('处理中出现错误');
|
||||
}
|
||||
},
|
||||
'timeout': 30000
|
||||
});
|
||||
}
|
||||
|
||||
$('#loading').css("opacity","0.2");
|
||||
$('#loading').ajaxComplete(function() {
|
||||
$(this).css('display','none');
|
||||
});
|
||||
$('#loading').ajaxSend(function() {
|
||||
$(this).css('display','block');
|
||||
});
|
||||
$("#loading").ajaxError(function() {
|
||||
$(this).css('display','none');
|
||||
Alert('请求超时或服务器开小差了,请刷新页面后重试');
|
||||
});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,128 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据作者管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,"colorbox");
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div id="loading" class="info info-box"></div>
|
||||
<div id="datalist">
|
||||
<?php if(!empty($this->authors)) { ?>
|
||||
<h2><?php echo $this->authors[0]['title']; ?></h2>
|
||||
<span id="addauthor_<?php echo $this->authors[0]['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $this->authors[0]['id']; ?>,'<?php echo $this->authors[0]['uuid']; ?>')">添加作者</a></span>
|
||||
<?php } else {?>
|
||||
<span id="addauthor_0"><a href="javascript:;" onclick="AddAuthor(0,'<?php echo $this->uuid; ?>')">添加作者</a></span>
|
||||
<?php } ?>
|
||||
<ul>
|
||||
<?php
|
||||
if(isset($this->authors))
|
||||
{
|
||||
foreach($this->authors as $v)
|
||||
{
|
||||
?>
|
||||
<li id="author_<?php echo $v['id'] ;?>">
|
||||
<p><?php echo $v['realname']; ?> [ <?php echo $v['username']; ?> ]</p>
|
||||
<p><span id="status_<?php echo $v['id'] ;?>"><?php if($v['status']==1) {echo "已认证";} if($v['status']==0) {echo "已申请";} if($v['status']==-1) {echo "已拒绝";} ?></span> |
|
||||
<a href="javascript:;" onclick="remove(<?php echo $v['id'] ;?>)">移除该作者</a>
|
||||
<span id="statusChange_<?php echo $v['id'] ;?>"><?php if($v['status']<1) {?> <a href="javascript:;" onclick="update(<?php echo $v['id'] ;?>)">认证该用户</a> <?php }?></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function update(id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/author/',
|
||||
'data':'ac=update&id='+id,
|
||||
'success':function(data){
|
||||
if (data!=null)
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(data.msg!=null)
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.updated)!='undefined')
|
||||
{$('#status_'+data.updated).html('已认证');$('#statusChange_'+data.updated).html('');}
|
||||
}else{
|
||||
Alert('处理中出现错误');
|
||||
}
|
||||
},
|
||||
'timeout': 30000
|
||||
});
|
||||
}
|
||||
function remove(id){
|
||||
if(confirm('确实要删除吗?')==false)
|
||||
{return false;}
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:'/admin/data/author',
|
||||
data:'ac=del&id='+id,
|
||||
success:function(data){
|
||||
if (data!=null)
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#author_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
|
||||
}else{
|
||||
Alert('处理中出现错误');
|
||||
}
|
||||
},
|
||||
'timeout': 30000
|
||||
});
|
||||
}
|
||||
function AddAuthor(id,uuid){
|
||||
$('#addauthor_'+id).html('用户名:<input type="text" id="authorInp_'+id+'"/><button class="btn btn-green" onclick="addAuthor('+id+',\''+uuid+'\')">添加</button>');
|
||||
}
|
||||
function addAuthor(id,uuid){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/author',
|
||||
'data':'ac=add&uuid='+uuid+'&username='+$('#authorInp_'+id).val(),
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.added)!='undefined')
|
||||
{$('#addauthor_'+id).html('<a href="javascript:;" onclick="AddAuthor('+id+',\''+uuid+'\')">添加作者</a>');}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
});
|
||||
}
|
||||
$('#loading').css("opacity","0.2");
|
||||
$('#loading').ajaxComplete(function() {
|
||||
$(this).css('display','none');
|
||||
});
|
||||
$('#loading').ajaxSend(function() {
|
||||
$(this).css('display','block');
|
||||
});
|
||||
$("#loading").ajaxError(function() {
|
||||
$(this).css('display','none');
|
||||
Alert('请求超时或服务器开小差了,请刷新页面后重试');
|
||||
});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,96 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据作者管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/author/ac/list">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li id="list_<?php echo $item['id'];?>">
|
||||
<p><a href="/admin/user/show/id/<?= $item['id'] ?>" target="_blank"><?php echo $item['realname'];?></a> </p>
|
||||
<p>
|
||||
<?php if ($item['d']) : ?>
|
||||
数据个数 :<span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['d']; ?></span> | <a href="javascript:;" onclick="view(<?= $item['id']?>)">查看数据</a> | Email: <span><?= $item['email'];?></span>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
function view(id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/author',
|
||||
'data':'ac=userdatas&id='+id,
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(data.datas != null)
|
||||
{
|
||||
html = "";
|
||||
for(v in data.datas)
|
||||
{
|
||||
html += '<li><a href="/data/'+data.datas[v].uuid+'" target="_blank">'+data.datas[v].title+'</a></li>';
|
||||
}
|
||||
$.colorbox({'innerWidth':'50%','html':html});
|
||||
}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,95 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据作者管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/author">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li id="list_<?php echo $item['id'];?>">
|
||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </p>
|
||||
<p>
|
||||
<?php if ($item['c']) : ?>
|
||||
作者数量 :<span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span> | <a href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>/window/iframe" class="iframe">作者管理</a> |
|
||||
<?php endif; ?>
|
||||
<span id="addauthor_<?php echo $item['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">添加作者</a></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
function AddAuthor(id,uuid){
|
||||
$('#addauthor_'+id).html('用户名:<input type="text" id="authorInp_'+id+'"/><button class="btn btn-green" onclick="addAuthor('+id+',\''+uuid+'\')">添加</button>');
|
||||
}
|
||||
function addAuthor(id,uuid){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/author',
|
||||
'data':'ac=add&uuid='+uuid+'&username='+$('#authorInp_'+id).val(),
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.status)!='undefined')
|
||||
{$('#addauthor_'+id).html('<a href="javascript:;" onclick="AddAuthor('+id+',\''+uuid+'\')">添加作者</a>');}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('导入服务器上元数据目录</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<form method="POST">
|
||||
<p>服务器上元数据所在目录(含所有子目录的xml文件): <input type="text" name="directory"></p>
|
||||
<input type="submit" value="导入元数据" />
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,142 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据反馈管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if(isset($this->title)) {
|
||||
echo "元数据《".$this->title."》的所有评论";
|
||||
}?>
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<ul>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<li>
|
||||
<p>用户名:<?php ($item['url'])?print '<a href="'.$item['url'].'">'.$item['author'].'</a>':print $item['author']; ?>,
|
||||
EMAIL:<?= $item['email']; ?>
|
||||
[类型:<?= $item['type']; ?>,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
|
||||
。操作: <a href="/admin/data/comment/delete/<?= $item['id']; ?>">删除</a> <a href="javascript:;" onclick="showreply(<?= $item['id']; ?>)">回复
|
||||
<?php if($item['reply_count']>0){echo "(".$item['reply_count'].")";}?></a>]</p>
|
||||
<p style="display:none;vertical-align:bottom" id="comment_reply_<?= $item['id']; ?>"><textarea id="reply_<?= $item['id']; ?>" class="middle half"></textarea>
|
||||
<button type="button" onclick="reply(<?= $item['id']; ?>,'<?= $item['uuid']; ?>')" class="btn btn-green" style="vertical-align:bottom">提交</button>
|
||||
<div style="width:90%; margin:0 auto;">
|
||||
<ul id="replyList_<?= $item['id']; ?>">
|
||||
</ul>
|
||||
</div>
|
||||
</p>
|
||||
<p>元数据:<a href="/data/<?= $item['uuid']; ?>"><?= $item['title']; ?></a></p>
|
||||
<p><?= $item['content']; ?></p>
|
||||
<p>IP:<?= $item['ip']; ?>,AGENT:<?= $item['agent']; ?></p>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?= $this->paginator; ?>
|
||||
<script>
|
||||
function reply(id,uuid)
|
||||
{
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/comment/reply/'+id,
|
||||
'data':'content='+$('#reply_'+id).val()+'&uuid='+uuid,
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.status)!='undefined')
|
||||
{$('#comment_reply_'+id).slideToggle();}
|
||||
}
|
||||
else{
|
||||
Alert('服务器响应出错,请重试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
});
|
||||
}
|
||||
function showreply(id){
|
||||
$('#comment_reply_'+id).slideToggle("slow", function () {
|
||||
if($('#comment_reply_'+id).css('display')!='none')
|
||||
{
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/comment/replylist/'+id,
|
||||
'data':'',
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
var html=new Array();
|
||||
for(i in data)
|
||||
{
|
||||
html.push('<li id="subReplyList_'+data[i].id+'">'+data[i].body+
|
||||
' ['+data[i].username+' | <a href="javascript:void(0);" onClick="delreply('+data[i].id+')">删除</a>]</li>');
|
||||
}
|
||||
html = html.join('');
|
||||
$('#replyList_'+id).html(html);
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
});
|
||||
}else{
|
||||
$('#replyList_'+id).html('');
|
||||
}
|
||||
});
|
||||
}
|
||||
function delreply(id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/comment/delreply/'+id,
|
||||
'data':'',
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#subReplyList_'+id).fadeOut('slow',function(){$(this).remove();})}
|
||||
}
|
||||
else{
|
||||
Alert('服务器响应出错,请重试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
});
|
||||
}
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('导入数据目录文件</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST">
|
||||
<p>数据目录文件通过在数据服务器所在目录进行信息提取后生成的一系列文本文件,上传到本服务器上再进行处理。具体包括dataset和以UUID为名称的文本文件。</p>
|
||||
<p>如若文件很多,处理时间会较长,请耐心等候。</p>
|
||||
<p>也可以采用分批处理UUID文件,即一次上传部分UUID文件。</p>
|
||||
<p>数据目录文件: <input type="text" name="directory"></p>
|
||||
<input type="submit" value="导入数据目录" />
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('特色数据集管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<a href="/admin/data/datasetcd/add/1">添加新的特色数据集</a><?= $this->paginator; ?>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<div id="datasetcd">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<ul><li><?= $item['title']; ?>[大小:<?= $item['size']; ?>M,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>]</li>
|
||||
<li><a href="/data/<?= $item['uuid']; ?>">元数据</a> (<a href="<?= $item['document']; ?>">数据文档</a>)</li>
|
||||
<li>操作:
|
||||
<a href="/admin/data/datasetcd/edit/<?= $item['id']; ?>">编辑</a>
|
||||
<a href="/admin/data/datasetcd/delete/<?= $item['id']; ?>">删除</a>
|
||||
</li>
|
||||
<img src="<?= $item['img']; ?>" />
|
||||
<li><?= $item['descript']; ?></li>
|
||||
</ul>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('特色数据集管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<a href="/admin/data/datasetcd/add/1">添加新的特色数据集</a>
|
||||
<?= $this->form; ?>
|
||||
</div>
|
|
@ -1,150 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
//$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('DOI');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="/admin/data/doi">浏览所有</a></li>
|
||||
<?php if(!empty($this->uuid)) {?>
|
||||
<li class="active"><a href="javascript:void(0);">编辑DOI</a></li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<form class="form-horizontal" method="post">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="doi">doi</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="doi" name="doi" readonly="readonly" value="<?= (isset($this->data['doi'])&&!empty($this->data['doi'])) ? $this->data['doi']:"doi:10.3972/westdc.x.2013.db" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="uuid">uuid</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="uuid" name="uuid" readonly="readonly" value="<?= isset($this->data['uuid']) ? $this->data['uuid']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="publisher">发布者</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="publisher" name="publisher" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="url">url</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="url" name="url" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="title">标题</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="title" name="title" readonly="readonly" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="title_en">英文标题</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="title_en" name="title_en" readonly="readonly" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="publisher_en">发布者英文</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="publisher_en" name="publisher_en" value="<?= isset($this->data['publisher_en']) ? $this->data['publisher_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($this->data['info']) || !is_array($this->data['info'])) {?>
|
||||
<div class="control-group infocontrol" id="info1">
|
||||
<label class="control-label" for="">数据作者信息</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="info[1][author]" value="" placeholder="作者" />
|
||||
<input type="text" name="info[1][organization]" value="" placeholder="单位" />
|
||||
<input type="text" name="info[1][author_en]" value="" placeholder="作者英文" />
|
||||
<input type="text" name="info[1][organization_en]" value="" placeholder="单位英文" />
|
||||
<input type="text" name="info[1][order]" value="" placeholder="排序" />
|
||||
</div>
|
||||
</div>
|
||||
<?php }else{ ?>
|
||||
<?php
|
||||
$index = 0;
|
||||
foreach($this->data['info'] as $k=>$v){
|
||||
$index ++;
|
||||
?>
|
||||
<div class="control-group infocontrol">
|
||||
<label class="control-label">info</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="info[<?= $k ?>][author]" value="<?= $v['author'] ?>" placeholder="作者" />
|
||||
<input type="text" name="info[<?= $k ?>][organization]" value="<?= $v['organization'] ?>" placeholder="单位" />
|
||||
<input type="text" name="info[<?= $k ?>][author_en]" value="<?= $v['author_en'] ?>" placeholder="作者英文" />
|
||||
<input type="text" name="info[<?= $k ?>][organization_en]" value="<?= $v['organization_en'] ?>" placeholder="单位英文" />
|
||||
<input type="text" name="info[<?= $k ?>][order]" value="<?= $v['order'] ?>" placeholder="排序" />
|
||||
<?php if($index>1){ ?>
|
||||
<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<a href="javascript:void(0);" onclick="addinput()">+添加一条</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<?php if(!empty($this->id)) { ?>
|
||||
<input type="hidden" name="id" value=" <?=$this->id?> " />
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->uuid)) { ?>
|
||||
<input type="hidden" name="uuid" value=" <?=$this->uuid?>" />
|
||||
<?php } ?>
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function addinput(){
|
||||
var now_index = $('.infocontrol').length;
|
||||
var index = now_index + 1;
|
||||
html = '<div class="control-group infocontrol"><div class="controls">'
|
||||
+ '<input type="text" name="info[' + index + '][author]" placeholder="作者" /> '
|
||||
+ '<input type="text" name="info[' + index + '][organization]" placeholder="单位" /> '
|
||||
+ '<input type="text" name="info[' + index + '][author_en]" placeholder="作者英文" /> '
|
||||
+ '<input type="text" name="info[' + index + '][organization_en]" placeholder="单位英文" /> '
|
||||
+ '<input type="text" name="info[' + index + '][order]" placeholder="排序" /> '
|
||||
+ '<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
|
||||
+ '</div></div>';
|
||||
now_index = null;
|
||||
index = null;
|
||||
$('.infocontrol').last().after(html);
|
||||
}
|
||||
function RmInput(e){
|
||||
$e = $(e);
|
||||
$e.parent('div').parent('div.infocontrol').remove();
|
||||
}
|
||||
</script>
|
||||
<!-- //页面内容 -->
|
|
@ -1,170 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('DOI');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="/admin/data/doi">浏览所有</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<th>元数据</th>
|
||||
<th>DOI</th>
|
||||
<th width="140">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<td><?php if (!empty($item['ts_published'])) { echo '已发布'; } else if (!empty($item['ts_submitted'])) { echo '已提交'; } ?></td>
|
||||
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
|
||||
<td><?= $item['doi'] ?></td>
|
||||
<td>
|
||||
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
|
||||
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
|
||||
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">验证</a>
|
||||
<?php if(empty($item['ts_published'])) {?>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/admin/data/doi/ac/del"
|
||||
}
|
||||
$(document).ready(function(e) {
|
||||
$('.verified_btn').click(function(e) {
|
||||
$(this).ajaxmsg({
|
||||
callback:function(){window.location.reload();}
|
||||
});
|
||||
});
|
||||
});
|
||||
(function( $ ){
|
||||
|
||||
$.fn.ajaxmsg = function( options ) {
|
||||
|
||||
var settings = $.extend( {
|
||||
url:'',
|
||||
callback : '',
|
||||
}, options);
|
||||
|
||||
var methods = {
|
||||
msg : function(id)
|
||||
{
|
||||
methods.submited();
|
||||
},
|
||||
creatWindow : function(content){
|
||||
$.colorbox({
|
||||
initialHeight: '0',
|
||||
initialWidth: '0',
|
||||
html: methods.dialog(content),
|
||||
opacity: '0.3',
|
||||
onComplete: function(){
|
||||
$('.confirm_yes').click(function(e){
|
||||
e.preventDefault();
|
||||
if(typeof(settings.callback)=='function')
|
||||
{
|
||||
settings.callback();
|
||||
}
|
||||
$.colorbox.close();
|
||||
});
|
||||
$('.confirm_no').click(function(e){
|
||||
e.preventDefault();
|
||||
$.colorbox.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
submited : function(){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':settings.url,
|
||||
'data':'',
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{alert(data.error);}
|
||||
if(typeof(data.success)!='undefined')
|
||||
{
|
||||
methods.creatWindow(data.success);
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('出现错误,请稍候再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
alert('出现错误,请刷新后重试');
|
||||
}
|
||||
});
|
||||
},
|
||||
dialog : function(content){
|
||||
HTML = '<div class=""><div class="modal-header"><h3>提示信息</h3></div>'
|
||||
+ '<div class="modal-body"><div class=" span5">'+content+'</div></div>'
|
||||
+ '<div class="modal-footer"><a href="javascript:void(0);" class="btn btn-primary confirm_yes">确定</a></div></div>';
|
||||
return HTML;
|
||||
}
|
||||
}
|
||||
|
||||
this.each(function() {
|
||||
settings.url = $(this).attr('rel');
|
||||
if(settings.url == '')
|
||||
{
|
||||
alert('参数错误');
|
||||
}
|
||||
methods.msg();
|
||||
});
|
||||
|
||||
};
|
||||
})( jQuery );
|
||||
</script>
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('特色推荐管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?= $this->paginator; ?><a href="/admin/data/feature/add/1">添加新的特色数据集</a>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<div id="feature">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<ul>
|
||||
<img src="<?= $item['imgurl']; ?>" />
|
||||
<li><?= $item['title']; ?>[创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>]</li>
|
||||
<li>详细地址:<?= $item['detailurl']; ?></li>
|
||||
<li>操作:
|
||||
<a href="/admin/data/feature/edit/<?= $item['id']; ?>">编辑</a>
|
||||
<a href="/admin/data/feature/delete/<?= $item['id']; ?>">删除</a>
|
||||
</li>
|
||||
<li><?= $item['description']; ?></li>
|
||||
</ul>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('特色推荐管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<a href="/admin/data/feature/add/1">添加新的特色推荐</a>
|
||||
<?= $this->form; ?>
|
||||
</div>
|
|
@ -1,91 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
//$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('支持项目');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="/admin/data/fund/ac/datalist">数据相关</a></li>
|
||||
<li><a href="/admin/data/fund/">所有项目</a></li>
|
||||
<li class="active"><a href="/admin/data/fund/ac/add">添加新项目</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<div class="alert alert-block alert-error fade in" id="Alert-error-box">
|
||||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||||
<?php if(!is_array($this->error)) { ?><h4 class="alert-heading"><?= $this->error ?></h4><?php } else { ?>
|
||||
<ul>
|
||||
<?php foreach($this->error as $v) { ?>
|
||||
<li><?= $v ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } else{ ?>
|
||||
<form class="form-horizontal" method="post">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="title">项目名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="title" name="title" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="fund_id">编号</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="fund_id" name="fund_id" value="<?= isset($this->data['fund_id']) ? $this->data['fund_id']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="fund_type">类型</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="fund_type" name="fund_type" value="<?= isset($this->data['fund_type']) ? $this->data['fund_type']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="title_en">英文名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="title_en" name="title_en" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="fund_type_en">英文类型</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="fund_type_en" name="fund_type_en" value="<?= isset($this->data['fund_type_en']) ? $this->data['fund_type_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<?php if(!empty($this->id)) { ?>
|
||||
<input type="hidden" name="id" value=" <?=$this->id?> " />
|
||||
<?php } ?>
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
|
@ -1,113 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="/admin/data/fund/ac/data">数据相关</a></li>
|
||||
<li><a href="/admin/data/fund/">所有项目</a></li>
|
||||
<li><a href="/admin/data/fund/ac/add">添加新项目</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(!empty($this->md)) { ?>
|
||||
<div>
|
||||
<?php if(empty($this->ct)) { ?>
|
||||
<a class="btn btn-primary pull-right" href="/author/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>"><i class="icon-plus"></i>为此数据添加项目</a>
|
||||
<?php }else{ ?>
|
||||
<a class="pull-right btn" href="/author/fund/uuid/<?= $this->md['uuid'] ?>">返回</a>
|
||||
<div class="pull-right label label-info">点击“添加此项目”即可将项目添加到元数据</div>
|
||||
<?php } ?>
|
||||
<h3>《<?= $this->md['title'] ?>》 的支持项目</h3>
|
||||
<hr />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?php if(empty($this->AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
|
||||
<div class="alert alert-block fade in <?= $AlertType ?>" id="Alert-error-box">
|
||||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||||
<?php if(!is_array($this->error)) { ?><h4 class="alert-heading"><?= $this->error ?></h4><?php } else { ?>
|
||||
<ul>
|
||||
<?php foreach($this->error as $v) { ?>
|
||||
<li><?= $v ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } else{ ?>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>项目编号</th>
|
||||
<th>项目类型</th>
|
||||
<th>数据个数</th>
|
||||
<th width="70">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<?php }else{?>
|
||||
<tr id="DataLine_<?= $item['mfid']?>">
|
||||
<?php }?>
|
||||
<td><?= $item['title'] ?></td>
|
||||
<td><?= $item['fund_id'] ?></td>
|
||||
<td><?= $item['fund_type'] ?></td>
|
||||
<th><?= $item['mds'] ?></th>
|
||||
<td>
|
||||
<a href="/data/fund/ac/dataview/id/<?= $item['id'] ?>">查看数据</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/author/fund/ac/mdfunddel/uuid/<?= $this->md['uuid'] ?>"
|
||||
}
|
||||
</script>
|
|
@ -1,100 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('申请成为元数据作者');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="/admin/data/fund/ac/datalist">数据相关</a></li>
|
||||
<li><a href="/admin/data/fund/">所有项目</a></li>
|
||||
<li><a href="/admin/data/fund/ac/add">添加新项目</a></li>
|
||||
<li class="active"><a href="javascript:void(0);">按项目查看</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(!empty($this->fund)) { ?>
|
||||
<div>
|
||||
<h3><?= $this->fund['title'] ?> 的相关数据</h3>
|
||||
<hr />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?php if(empty($this->AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
|
||||
<div class="alert alert-block fade in <?= $AlertType ?>" id="Alert-error-box">
|
||||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||||
<?php if(!is_array($this->error)) { ?><h4 class="alert-heading"><?= $this->error ?></h4><?php } else { ?>
|
||||
<ul>
|
||||
<?php foreach($this->error as $v) { ?>
|
||||
<li><?= $v ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } else{ ?>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>数据</th>
|
||||
<th width="70">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<tr id="DataLine_<?= $item['mfid']?>">
|
||||
<td><?= $item['mdtitle'] ?></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['mfid']?>)" id="delbtn_<?= $item['mfid']?>">移除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/author/fund/ac/mdfunddel/uuid/<?= $this->md['uuid'] ?>"
|
||||
}
|
||||
</script>
|
|
@ -1,78 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('支持项目');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="/admin/data/fund/">所有项目</a></li>
|
||||
<li><a href="/admin/data/fund/ac/add">添加新项目</a></li>
|
||||
<li class="active"><a href="/admin/data/fund/ac/data/id/<?= $this->id ?>">相关数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<h3><?= $this->info['title'] ?> 的相关数据</h3>
|
||||
<hr />
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th width="70">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<?php }else{?>
|
||||
<tr id="DataLine_<?= $item['mfid']?>">
|
||||
<?php }?>
|
||||
<td><?= $item['title'] ?></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/admin/data/fund/ac/mdfunddel/"
|
||||
}
|
||||
</script>
|
|
@ -1,175 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('支持项目');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="/admin/data/fund/ac/datalist">数据相关</a></li>
|
||||
<li <?php if(empty($this->md)) { ?>class="active"<?php } ?>><a href="/admin/data/fund/">所有项目</a></li>
|
||||
<li><a href="/admin/data/fund/ac/add">添加新项目</a></li>
|
||||
<?php if(!empty($this->md)) { ?>
|
||||
<li class="active"><a href="/admin/data/fund/">按数据查看</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(!empty($this->md)) { ?>
|
||||
<div>
|
||||
<?php if(empty($this->ct)) { ?>
|
||||
<a class="btn btn-primary pull-right" href="/admin/data/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>"><i class="icon-plus"></i>为此数据添加项目</a>
|
||||
<?php }else{ ?>
|
||||
<a class="pull-right btn" href="/admin/data/fund/uuid/<?= $this->md['uuid'] ?>">返回</a>
|
||||
<div class="pull-right label label-info">点击“添加此项目”即可将项目添加到元数据</div>
|
||||
<?php } ?>
|
||||
<h3>《<?= $this->md['title'] ?>》 的支持项目</h3>
|
||||
<hr />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?php if(empty($this->AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
|
||||
<div class="alert alert-block fade in <?= $AlertType ?>" id="Alert-error-box">
|
||||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||||
<?php if(!is_array($this->error)) { ?><h4 class="alert-heading"><?= $this->error ?></h4><?php } else { ?>
|
||||
<ul>
|
||||
<?php foreach($this->error as $v) { ?>
|
||||
<li><?= $v ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } else{ ?>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>编号</th>
|
||||
<th>类型</th>
|
||||
<?php if($this->md) { ?>
|
||||
<th width="80">排序</th>
|
||||
<?php }else{ ?>
|
||||
<th>英文标题</th>
|
||||
<th>英文类型</th>
|
||||
<?php } ?>
|
||||
<?php if($this->ct) { ?>
|
||||
<th>添加</th>
|
||||
<?php } ?>
|
||||
<th width="100">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<?php }else{?>
|
||||
<tr id="DataLine_<?= $item['mfid']?>">
|
||||
<?php }?>
|
||||
<td><?= $item['title'] ?></td>
|
||||
<td><?= $item['fund_id'] ?></td>
|
||||
<td><?= $item['fund_type'] ?></td>
|
||||
<?php if($this->md) { ?>
|
||||
<?php if($this->ct) { ?>
|
||||
<td><input type="text" name="order" id="order_<?= $item['id']?>" class="span12" /></td>
|
||||
<?php }else{ ?>
|
||||
<td><input type="text" name="order" id="order_<?= $item['mfid']?>" class="span12" value="<?= $item['place'] ?>" /></td>
|
||||
<?php }?>
|
||||
<?php }else{ ?>
|
||||
<td><?= $item['title_en'] ?></td>
|
||||
<td><?= $item['fund_type_en'] ?></td>
|
||||
<?php } ?>
|
||||
<?php if($this->ct) { ?>
|
||||
<td><a href="javascript:void(0);" class="addtomd" rel="<?= $item['id']?>">添加此项目</a></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
<a href="/admin/data/fund/ac/data/id/<?= $item['id']?>">数据</a>
|
||||
<a href="/admin/data/fund/ac/edit/id/<?= $item['id']?>">编辑</a>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||
<?php }else{ ?>
|
||||
<?php if(empty($this->ct)) { ?><a href="javascript:void(0);" class="changeorder" rel="<?= $item['mfid']?>">排序</a> <?php } ?>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['mfid']?>)" id="delbtn_<?= $item['mfid']?>">移除</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<?php if(!empty($this->md)) { ?>
|
||||
暂无数据,点击标题右侧添加按钮为此数据添加项目
|
||||
<?php }else{ ?>
|
||||
暂无数据
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
<?php if(!empty($this->ct)) { ?>
|
||||
$('.addtomd').each(function(index, element) {
|
||||
$(this).click(function(){
|
||||
id = $(this).attr('rel');
|
||||
order = $('#order_'+id).val();
|
||||
self.location='/admin/data/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>/id/'+id+'/order/'+ order
|
||||
});
|
||||
});
|
||||
<?php }else{ ?>
|
||||
$('.changeorder').each(function(index, element) {
|
||||
$(this).click(function(){
|
||||
id = $(this).attr('rel');
|
||||
order = $('#order_'+id).val();
|
||||
self.location='/admin/data/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>/mfid/'+id+'/order/'+ order
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/admin/data/fund/ac/del"
|
||||
}
|
||||
<?php }else{ ?>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/admin/data/fund/ac/mdfunddel/uuid/<?= $this->md['uuid'] ?>"
|
||||
}
|
||||
<?php } ?>
|
||||
</script>
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('上传元数据</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<form enctype="multipart/form-data" method="POST">
|
||||
<!-- MAX_FILE_SIZE must precede the file input field -->
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
|
||||
<!-- Name of input element determines name in $_FILES array -->
|
||||
上传元数据文件: <br />
|
||||
<input name="xmlfile[]" type="file" /><br />
|
||||
<input name="xmlfile[]" type="file" /><br />
|
||||
<input name="xmlfile[]" type="file" /><br />
|
||||
<input type="submit" value="导入" />
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('数据管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="divContent">
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -1,23 +0,0 @@
|
|||
<ul>
|
||||
<li class="title">数据管理</li>
|
||||
<li><a href="/admin/data/md">元数据管理</a></li>
|
||||
<li><a href="/admin/data/newdata">新建元数据</a></li>
|
||||
<li><a href="/admin/data/author">数据作者管理</a></li>
|
||||
<li><a href="/admin/data/version">数据版本管理</a></li>
|
||||
<li><a href="/admin/data/comment">数据反馈管理</a></li>
|
||||
<li><a href="/admin/data/reference">数据文献管理</a></li>
|
||||
<li><a href="/admin/data/ref">文献管理</a></li>
|
||||
<li><a href="/admin/data/attachments">数据附件管理</a></li>
|
||||
<!--
|
||||
<li><a href="/admin/data/import">上传元数据文件</a></li>
|
||||
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li>
|
||||
<li><a href="/admin/data/datafileimport">导入数据目录</a></li>
|
||||
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
|
||||
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
|
||||
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
|
||||
<li><a href="/admin/data/feature">特色推荐</a></li> -->
|
||||
<li><a href="/admin/data/source">专题管理</a></li>
|
||||
<li><a href="/admin/data/project">汇交计划</a></li>
|
||||
<li><a href="/admin/data/fund">支持项目</a></li>
|
||||
<li><a href="/admin/data/doi">DOI</a></li>
|
||||
</ul>
|
|
@ -1,99 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>数据存档</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
|
||||
<script src='/static/js/jquery-1.7.2.min.js' type="text/javascript"></script>
|
||||
<script type="text/javascript" src="/js/jquery.colorbox-min.js"></script>
|
||||
<link href="/css/author.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||
<link href="/static/js/uploadify/uploadify.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<link href="/css/colorbox.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
#loading{margin:0px;border:none;height:50px;width:98%;background:url(/static/img/colorbox-images/loading.gif) center center no-repeat;display:none;position:absolute;left:0px;top:0px;overflow:hidden;background:#ccc;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="warpper">
|
||||
<div id="loading" class="info info-box"></div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if(!empty($this->dataset))
|
||||
{?>
|
||||
<p>主机:<br /><input type="text" id="host" name="host" value="<?= $this->dataset['host']?>" class="full" /></p>
|
||||
<p>路径:<br /><input type="text" id="path" name="path" value="<?= $this->dataset['path']?>" class="full" /></p>
|
||||
<p><button type="button" class="btn btn-green" onclick="updateDataSet()">修改</button></p>
|
||||
<?php }else{ ?>
|
||||
<p>主机:<br /><input type="text" id="host" name="host" value="" class="full" /></p>
|
||||
<p>路径:<br /><input type="text" id="path" name="path" value="" class="full" /></p>
|
||||
<p><button type="button" class="btn btn-green" onclick="addDataSet()">添加</button></p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
function updateDataSet(){
|
||||
if(confirm("是否确定修改") == false)
|
||||
{return false;}
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/dataset',
|
||||
'data':'ac=update&uuid=<?= $this->uuid ?>&host='+$('#host').val()+'&path='+$('#path').val(),
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(data.ok != null)
|
||||
{
|
||||
Alert('修改成功!');
|
||||
setTimeout("parent.$.fn.colorbox.close();",2000);
|
||||
}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
});
|
||||
}
|
||||
function addDataSet(){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/dataset',
|
||||
'data':'ac=add&uuid=<?= $this->uuid ?>&host='+$('#host').val()+'&path='+$('#path').val(),
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(data.ok != null)
|
||||
{
|
||||
Alert('添加成功!');
|
||||
setTimeout("parent.$.fn.colorbox.close();parent.window.location.href=parent.window.location.href;",2000);
|
||||
}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,88 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('元数据管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="right_title">元数据管理</div>
|
||||
|
||||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<div class="input-prepend">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input class="span2 search-query" type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字"/>
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<a href="/admin/data/md/down/1">下载全部xml元数据</a>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<div class="datalist">
|
||||
<ul>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<li class="well well-small">
|
||||
<h4><a href="/data/<?= $item['uuid']; ?>" class="title"><?= $item['title']; ?></a></h4>
|
||||
<p>大小:<?= $item['filesize']; ?>M,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>,查看:<?= $item['viewed']; ?>次。</p>
|
||||
<p>
|
||||
操作:
|
||||
<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a> |
|
||||
<a href="/admin/data/md/delete/<?= $item['uuid']; ?>">删除</a> |
|
||||
<a href="/admin/data/sync/uuid/<?= $item['uuid']; ?>">同步</a> |
|
||||
<a href="/admin/data/reference/show/<?php echo $item['uuid'];?>">文献管理</a> |
|
||||
<a href="/admin/data/md/att/1/uuid/<?php echo $item['uuid'];?>">附件管理</a> |
|
||||
<a href="/admin/data/comment/uuid/<?php echo $item['uuid'];?>">反馈管理</a> |
|
||||
<a href="/admin/data/author/uuid/<?php echo $item['uuid'];?>">作者管理</a> |
|
||||
<a href="/admin/data/version/uuid/<?php echo $item['uuid'];?>">版本管理</a> |
|
||||
<?php if (@!is_numeric($item['mdstatus'])) : ?>
|
||||
<a href="/admin/review/addon/uuid/<?php echo $item['uuid'];?>">放入元数据评审</a> |
|
||||
<?php endif; ?>
|
||||
<a href="/admin/data/source/do/datasource/uuid/<?php echo $item['uuid'];?>">编辑数据来源</a> |
|
||||
<?php if(!empty($item['datasetid'])):?>
|
||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">数据路径</a> |
|
||||
<a href="/admin/data/dataset/ac/import/uuid/<?php echo $item['uuid'];?>" class="iframe">重新导入数据目录</a> |
|
||||
<?php else: ?>
|
||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">设置数据路径</a> |
|
||||
<?php endif;?>
|
||||
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a> |
|
||||
<a href="/admin/data/fund/uuid/<?php echo $item['uuid'];?>">支持项目</a> |
|
||||
<a href="/admin/data/doi/uuid/<?php echo $item['uuid'];?>">DOI</a>
|
||||
</p>
|
||||
<?php if($item['author']) :?>
|
||||
<p>数据贡献者:<?= $item['author']; ?></p>
|
||||
<?php endif;?>
|
||||
<p class="content"><?= $item['description']; ?></p>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->paginator; ?>
|
||||
</div>
|
||||
<script>
|
||||
$(".iframe").colorbox({iframe:true, width:"50%", height:"50%"});
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,63 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('新建元数据');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id='leftPanel'>
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata">未提交数据列表</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="datalist">
|
||||
<h2>根据已有数据创建元数据</h2>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/newdata/ac/add-by-data">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;
|
||||
?>
|
||||
<li>
|
||||
<p><span class="title"><?php echo $item['title'];?></span>
|
||||
【<a href="/service/geonetwork?url=metadata.create?group=2<?php echo urlencode('&id='.$item['gid']); ?>">以此为模板新建</a>
|
||||
| <a href="/data/<?php echo $item['uuid'];?>" target="_blank">查看数据</a>】</p>
|
||||
<p><?php echo mb_strlen($item['description'])>400?$this->escape(mb_substr($item['description'],0,400,'UTF-8').'...'):$this->escape($item['description']); ?></p>
|
||||
</li>
|
||||
<?php
|
||||
endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$('#wapper').width($('body').width()-300);
|
||||
</script>
|
|
@ -1,64 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('新建元数据');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id='leftPanel'>
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata">未提交数据列表</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="datalist">
|
||||
<h2>根据预制元数据模板创建数据</h2>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/newdata/ac/add-by-template">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;
|
||||
?>
|
||||
<li>
|
||||
<p><span class="title"><?php echo $item['title'];?></span>
|
||||
【<a href="/service/geonetwork?url=metadata.create?group=2<?php echo urlencode('&id='.$item['id']); ?>" target="_blank">以此为模板新建</a>
|
||||
| <a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['id'];?>" target="_blank">修改此模板</a>
|
||||
| <a href="/service/geonetwork?url=metadata.show?id=<?php echo $item['id'];?>" target="_blank">查看此模板</a>
|
||||
】</p>
|
||||
</li>
|
||||
<?php
|
||||
endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$('#wapper').width($('body').width()-300);
|
||||
</script>
|
|
@ -1,111 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('新建元数据');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id='leftPanel'>
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/newdata">未提交数据列表</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-template">根据模板新建元数据</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;
|
||||
?>
|
||||
<li>
|
||||
<p><?php echo $item['username'];?>(<?php echo $item['realname'];?>) <span class="title"><?php echo $item['title'];?></span>
|
||||
【<a href="/service/geonetwork?url=metadata.show?id=<?php echo $item['id']; ?>" target="_blank">在geonetwork里查看</a>
|
||||
| <a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['id']; ?>" target="_blank">在geonetwork里修改</a>
|
||||
| <a href="/service/geonetwork?url=metadata.delete?id=<?php echo $item['id']; ?>" target="_blank">删除此条数据</a>
|
||||
| <a onclick="validate(<?php echo $item['id'];?>);" class="more inline">检查元数据错误</a>
|
||||
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
|
||||
】</p>
|
||||
</li>
|
||||
<?php
|
||||
endforeach;
|
||||
echo "</ul>";
|
||||
else :
|
||||
echo "<p>您当前没有未提交的数据。</p>";
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
|
||||
function action(ac,id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/newdata/',
|
||||
'data':'ac='+ ac +'&id='+id,
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{$.colorbox({'innerWidth':'50%','html':data.error});}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#list_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
|
||||
if(typeof(data.commited)!='undefined')
|
||||
{$('#changelog').val('');$('#commit_submit').attr('onclick','');}
|
||||
}
|
||||
else{
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_warning.png" /><h4>出现错误,请稍候再试</h4>'});
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
});
|
||||
}
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
function commit(id){
|
||||
action('commit&changelog='+$('#changelog').val(),id);
|
||||
}
|
||||
function validate(id){
|
||||
action('validate',id);
|
||||
}
|
||||
</script>
|
||||
<div class="colorbox" style="display:none;">
|
||||
<div id="commitform">
|
||||
<form>
|
||||
<p>
|
||||
<label>简要功能:</label><br />
|
||||
<textarea class="full" style="resize:none;height:200px;" id="changelog"></textarea>
|
||||
<br /><small>请输入此数据的简要功能和特色</small>
|
||||
</p>
|
||||
<input type="button" onclick="" id="commit_submit" class="btn btn-green big" value="提交"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div>
|
||||
<div class="ok"><img src="/images/alert_big_ok.png" /><span></span></div>
|
||||
<div class="warning"><img src="/images/alert_big_warning.png" /><span></span></div>
|
||||
</div>
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据通讯管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
数据通讯上传格式要求:PDF文件名称为newsletter_N.pdf格式,其中N为数字,代表第几期。
|
||||
<?= $this->form; ?>
|
||||
<?php
|
||||
foreach ($this->newsletters as $nl){
|
||||
$name=basename($nl,'.pdf');
|
||||
list(,$num)=explode("_",$name);
|
||||
?>
|
||||
<div class="newsletter">
|
||||
|
||||
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank">
|
||||
<img src="/images/newsletter/<?php echo $name; ?>.jpg" /></a><br />
|
||||
<a href="/images/newsletter/<?php echo $nl; ?>" target="_blank">第<?php echo $num;?>期数据通讯</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
|
@ -1,75 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/heihe">黑河数据集</a>');
|
||||
$this->breadcrumb('黑河数据集');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
?>
|
||||
<?php
|
||||
if(!empty($this->error))
|
||||
{
|
||||
echo $this->error;
|
||||
echo "<script>setTimeout('parent.$.fn.colorbox.close();',2000);</script>";
|
||||
}else{?>
|
||||
<div class="content" id="datalist">
|
||||
<ul>
|
||||
<?php
|
||||
foreach($this->experts as $k=>$v)
|
||||
{
|
||||
echo '<li id="item_'.$k.'"><p>'.$v['name'] ." - ".
|
||||
$v['email'].' - '.
|
||||
$v['validation'].' - '.
|
||||
$v['created'] .'
|
||||
<lable id="delBtn_'.$k.'">
|
||||
【<a href="javascript:void(0);" onclick="del(\''.$k.'\',\''.$v['email'].'\')">删除</a>】</lable</p>
|
||||
<p>邀请链接:'.$v['url'].'</p>
|
||||
</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
function del(id,email){
|
||||
var dom = "#delBtn_"+id;
|
||||
var html = $(dom).html();
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/project/ac/remove',
|
||||
'data':'id=<?= $this->pid;?>&del='+email,
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#item_'+id).fadeOut(function(){$(this).remove();});}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){Alert('处理中出现错误,请刷新页面后重试');},
|
||||
'beforeSend':function(){$(dom).html('<img src="/images/ajax-load-small.gif" />');$(dom).attr("disabled","disabled")},
|
||||
'complete':function(){$(dom).html(html);$(dom).removeAttr("disabled");dom = null;}
|
||||
});
|
||||
}
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('上传计划');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headScript()->appendFile('/static/js/uploadify/swfobject.js');
|
||||
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
|
||||
$this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css');
|
||||
?>
|
||||
<?php
|
||||
if(!empty($this->error))
|
||||
{
|
||||
echo $this->error;
|
||||
echo "<script>setTimeout('parent.$.fn.colorbox.close();',2000);</script>";
|
||||
}else{?>
|
||||
<?php if(!empty($this->message))
|
||||
{
|
||||
echo "<p>".$this->message."</p>";
|
||||
}?>
|
||||
<?php
|
||||
if(!empty($this->att))
|
||||
{
|
||||
echo '<div id="datalist">
|
||||
<ul>'.
|
||||
'<li>'.$this->att['realname']."(". round(($this->att['filesize'])/1024,2) .'KB) 【<a href="/service/attach/id/'.$this->att['id'].'">下载</a>】</li>'
|
||||
.'</ul></div>';
|
||||
}
|
||||
?>
|
||||
<div id="wapper">
|
||||
<form id="fileUpdate" action="/admin/heihe/project/ac/upload/pid/<?= $this->pid ?>" method="post" enctype="multipart/form-data">
|
||||
<p>注:只能选择一个文件,如果重新上传,将自动替换之前上传的文件<br />
|
||||
<input id="file_upload" name="Filedata" type="file" />
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<input type="submit" class="btn btn-small btn-green" value="上传" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('黑河数据集');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'jquery');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if(!empty($this->searchLink)){ ?>
|
||||
<div>
|
||||
<form id="datasearch" class="search_form" action="<?= $this->searchLink ?>">
|
||||
<input type="text" id="keyword" name="q" value="<?= $this->searchKeyword; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div>
|
||||
共 <?= $this->Count; ?> 条记录
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;
|
||||
?>
|
||||
<li>
|
||||
<p><span class="title"><?php echo $item['title'];?></span></p>
|
||||
<p>编号:<?= $item['code'];?> | 负责人:<?= $item['name'];?> | 开始时间:<?= $item['pstart'];?> |
|
||||
状态:<span id="status_alias_<?= $item['id']?>"><?= $item['status_alias'];?></span></p>
|
||||
<p>
|
||||
<a href="javascript:void(0);" onclick="$('#inviteFrom_<?= $item['id'];?>').toggle();">邀请跟踪专家</a> |
|
||||
<a class="iframe" href="/admin/data/project/ac/showexpert/id/<?= $item['id'];?>">查看跟踪专家</a> |
|
||||
<a href="/admin/data/project/ac/upload/pid/<?= $item['id']?>" class="iframe">上传计划</a> |
|
||||
<a href="javascript:void(0);" onclick="changeStatus(<?= $item['id'];?>,<?= $item['status']?>)">状态修改</a>
|
||||
<?php if(!empty($item['attachid'])) { ?>
|
||||
| <a href="/service/attach/id/<?= $item['attachid'];?>">下载</a>
|
||||
<?php } ?>
|
||||
</p>
|
||||
<p id="inviteFrom_<?= $item['id'];?>" style="display:none;">
|
||||
<input type="text" id="expert_name_<?= $item['id'];?>" value="<?= $this->input_NameDefaultVal ?>"
|
||||
onfocus="if(this.value=='<?= $this->input_NameDefaultVal ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?= $this->input_NameDefaultVal ?>'}" />
|
||||
<input type="text" id="expert_email_<?= $item['id'];?>" value="<?= $this->input_EmailDefaultVal ?>"
|
||||
onfocus="if(this.value=='<?= $this->input_EmailDefaultVal ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?= $this->input_EmailDefaultVal ?>'}" />
|
||||
<button type="button" class="btn btn-green" onclick="invite(<?= $item['id'];?>)" id="inviteBtn_<?= $item['id'];?>">邀请</button>
|
||||
</p>
|
||||
</li>
|
||||
<?php
|
||||
endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<div style="display:none;">
|
||||
<div id="confirm_dialog" class="cbox_content">
|
||||
<div class="sepH_c tac"><strong>状态修改</strong></div>
|
||||
<div id="cbox_dialog_content" class="sepH_c">
|
||||
<select id="status_selector" style="width:300px;" name="">
|
||||
<?php
|
||||
foreach($this->project_status as $k=>$v)
|
||||
{
|
||||
echo '<option value="'.$k.'">'.$v.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="tac" id="cbox_ctl_btns">
|
||||
<a href="javascript:void(0);" class="btn btn-green" id="confirm_yes"
|
||||
onclick="changeStatusAction($('#status_selector').attr('name'),$('#status_selector').val());">OK</a>
|
||||
<a href="javascript:void(0);" class="btn" id="confirm_no" onclick="$.colorbox.close();">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function changeStatus(project,status)
|
||||
{
|
||||
$('#status_selector').attr('name',project);
|
||||
$.colorbox({
|
||||
initialHeight: '0',
|
||||
initialWidth: '0',
|
||||
href: "#confirm_dialog",
|
||||
inline: true,
|
||||
opacity: '0.7'
|
||||
});
|
||||
}
|
||||
|
||||
function changeStatusAction(project,code)
|
||||
{
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/project/ac/changestatus',
|
||||
'data':'p='+project + '&s='+code,
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.status)!='undefined')
|
||||
{$('#status_alias_'+project).html(data.status);}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){Alert('处理中出现错误,请刷新页面后重试');}
|
||||
});
|
||||
}
|
||||
|
||||
function invite(id){
|
||||
var dom = "#inviteBtn_"+id;
|
||||
var html = $(dom).html();
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/project/ac/invite',
|
||||
'data':'id='+id+'&name='+$('#expert_name_'+id).val()+'&email='+$('#expert_email_'+id).val(),
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.invited)!='undefined')
|
||||
{$('#expert_name_'+id).val('');$('#expert_email_'+id).val('');}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){Alert('处理中出现错误,请刷新页面后重试');},
|
||||
'beforeSend':function(){$(dom).html('<img src="/images/ajax-load-small.gif" />');$(dom).attr("disabled","disabled")},
|
||||
'complete':function(){$(dom).html(html);$(dom).removeAttr("disabled");dom = null;}
|
||||
});
|
||||
}
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
</script>
|
|
@ -1,198 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,"uploadify");
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<form class="form-horizontal" method="post">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputTitle">文章标题</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="title" id="inputTitle" class="input-block-level" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputYear">出版年份</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="year" id="inputYear" value="<?= isset($this->data['year']) ? $this->data['year']:"" ?>">
|
||||
<select class="span2">
|
||||
<?php for($i=2000;$i<=(int)date("Y");$i++) {?>
|
||||
<option value="<?= $i ?>" onclick="$('#inputYear').val(this.value)"><?= $i ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputYear">出版社/期刊</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="publisher" id="inputYear" class="input-block-level" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputReference">引用方式(前台显示)</label>
|
||||
<div class="controls">
|
||||
<textarea name="reference" id="inputReference" class="input-block-level"><?= isset($this->data['reference']) ? $this->data['reference']:"" ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputLink">链接(自动填写请留空)</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="link" id="inputLink" class="input-block-level" value="<?= isset($this->data['link']) ? $this->data['link']:"" ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputType">类型</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="type" id="inputType" class="input-block-level" value="<?= isset($this->data['type']) ? $this->data['type']:"" ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputLanguage">语言</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="language" id="inputLanguage" class="input-block-level" value="<?= isset($this->data['language']) ? $this->data['language']:"" ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputDoi">DOI</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="doi" id="inputDoi" class="input-block-level" value="<?= isset($this->data['doi']) ? $this->data['doi']:"" ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputBibtex">ris</label>
|
||||
<div class="controls">
|
||||
<textarea name="ris" id="inputBibtex" class="input-block-level"><?= isset($this->data['ris']) ? $this->data['ris']:"" ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputAbstract">摘要</label>
|
||||
<div class="controls">
|
||||
<textarea name="abstract" id="inputAbstract" class="input-block-level"><?= isset($this->data['abstract']) ? $this->data['abstract']:"" ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputNote">备注</label>
|
||||
<div class="controls">
|
||||
<textarea name="note" id="inputNote" class="input-block-level"><?= isset($this->data['note']) ? $this->data['note']:"" ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPDF">PDF</label>
|
||||
<div class="controls">
|
||||
<input type="file" name="Filedata" id="file_upload" />
|
||||
<div id="uploadedFile"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
<button type="reset" class="btn">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
$('#btn-add-author').click(function(e) {
|
||||
html = '';
|
||||
$('#author_inputs').append('');
|
||||
});
|
||||
});
|
||||
var _this = {
|
||||
SessionID : '<?php echo session_id(); ?>'
|
||||
};
|
||||
var uploader;
|
||||
var param;
|
||||
param = {
|
||||
"PHPSESSID" : _this.SessionID,
|
||||
};
|
||||
$(function() {
|
||||
$('#file_upload').uploadify({
|
||||
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||
'uploader' : '/admin/data/ref/ac/pdfupload',
|
||||
'multi' : false,
|
||||
'auto' : true,
|
||||
'fileTypeExts' : '*.pdf',
|
||||
'onUploadSuccess' : function(file, data, response) {
|
||||
upload.onsuccess(file, data, response);
|
||||
},
|
||||
'onUploadStart' : function(file) {
|
||||
$('#file_upload').uploadify('settings','formData',param);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var upload = {
|
||||
onsuccess : function(file, data, response){
|
||||
_data = $.parseJSON(data);
|
||||
if(!$.isEmptyObject(_data.error))
|
||||
{
|
||||
alert(_data.error);
|
||||
}else{
|
||||
$('#uploadedFile').html(upload.makeFileHtml(_data));
|
||||
}
|
||||
},
|
||||
makeFileHtml : function(data){
|
||||
return '<div class="alert alert-success">'
|
||||
+'<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile('+data.id+')"><i class="icon-trash icon-white"></i></button>'
|
||||
+ data.realname
|
||||
+'<input type="hidden" name="attid" value="'+data.id+'"></input>'
|
||||
+'</div>';
|
||||
},
|
||||
deleteFile : function(id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/ref/ac/delete',
|
||||
'data':'attid=' + id,
|
||||
'success':function(data){
|
||||
if(typeof(data) == 'undefined')
|
||||
{
|
||||
alert("数据源错误,请联系管理员");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!$.isEmptyObject(data.error))
|
||||
{
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
alert('附件删除出错');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
|
||||
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data['file']) ?>' />
|
||||
<script>
|
||||
upload.onsuccess('',$('#reference_file_content').val(),"");
|
||||
</script>
|
||||
<?php } ?>
|
|
@ -1,105 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>文件名</th>
|
||||
<th>状态</th>
|
||||
<th width="140">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<td><?= $item['realname'] ?></td>
|
||||
<td><?= empty($item['attid']) ? '<font color="#CC0000">未编辑</font>':"已编辑" ?></td>
|
||||
<td>
|
||||
<a class="file-editor" href="/admin/data/ref/ac/add/<?= empty($item['attid']) ? 'attid/'.$item['id'] : 'id/'.$item['refid']?>">编辑</a>
|
||||
<a href="javascript:void(0);" onclick="file.delete(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
|
||||
});
|
||||
var file = {
|
||||
delete : function(id){
|
||||
if(confirm("是否确定删除?") == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/ref/ac/delete',
|
||||
'data':'attid=' + id,
|
||||
'success':function(data){
|
||||
if(typeof(data) == 'undefined')
|
||||
{
|
||||
alert("数据源错误,请联系管理员");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!$.isEmptyObject(data.error))
|
||||
{
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#DataLine_'+id).fadeOut();
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
alert('附件删除出错');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,49 +0,0 @@
|
|||
<div class="modal hide fade" id="mdref-form">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>添加数据文献</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="mdref" method="post" class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputRefid">文献ID</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="refid" id="inputRefid" placeholder="文献ID" value="<?= empty($this->refid) ? "":$this->refid ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputUuid">元数据UUID</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="uuid" id="inputUuid" placeholder="UUID">
|
||||
<span class="help-block"><a href="javascript:void(0);" onclick="$(this).parent('span').prev('input').val('e31f5ea7-a4af-4ae3-9ac1-1a84132c4338')">设为数据中心文献</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPlace">排序数值(数字)</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="place" id="inputPlace" placeholder="排序">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">文献类型</label>
|
||||
<div class="controls">
|
||||
<?php foreach($this->referenceType as $k=>$v) { ?>
|
||||
<label class="radio">
|
||||
<input type="radio" name="reftype" value="<?= $k ?>" /> <?= $v ?>
|
||||
</label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="id" value="" />
|
||||
</form>
|
||||
</div>
|
||||
<div id="alert-info"></div>
|
||||
<div class="modal-footer">
|
||||
<div class="progress progress-striped active" id="submit-loading" style="display:none;">
|
||||
<div class="bar" style="width:100%;"></div>
|
||||
</div>
|
||||
<button onclick="$('#mdref')[0].reset();" class="btn">Reset</button>
|
||||
<button onclick="$('#mdref-form').modal('hide');" class="btn">Close</button>
|
||||
<button onclick="mdref.create()" class="btn btn-primary" id="submit_btn">Save changes</button>
|
||||
</div>
|
||||
</div>
|
|
@ -1,69 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
$this->theme->AppendModel($this,'admin-data-ref');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<button type="button" class="btn btn-primary" onclick="$('#mdref')[0].reset();$('#mdref-form').modal('show');">添加一条</button>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>元数据</th>
|
||||
<th>类型</th>
|
||||
<th>排序</th>
|
||||
<th width="140">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<td><?= $item['title'] ?></td>
|
||||
<td><?= isset($this->referenceType[$item['reftype']]) ? $this->referenceType[$item['reftype']]:"" ?></td>
|
||||
<td><?= $item['place'] ?></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="mdref.edit(<?= $item['id'] ?>,<?= $item['refid']?>,'<?= $item['uuid'] ?>',<?= $item['reftype'] ?>,<?= $item['place'] ?>)">编辑</a>
|
||||
<a href="/admin/data/ref/ac/delmdref/id/<?= $item['id']?>">移除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType,'refid'=>$this->refid)); ?>
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
});
|
||||
</script>
|
|
@ -1,120 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,"uploadify");
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<form class="form-horizontal" method="post">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPassword">PDF</label>
|
||||
<div class="controls">
|
||||
<input type="file" name="Filedata" id="file_upload" />
|
||||
<div id="uploadedFile"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<a class="btn btn-primary" href="/admin/data/ref/ac/files">文件管理</a>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
var _this = {
|
||||
SessionID : '<?php echo session_id(); ?>'
|
||||
};
|
||||
var uploader;
|
||||
var param;
|
||||
param = {
|
||||
"PHPSESSID" : _this.SessionID,
|
||||
"multi" : 'yes'
|
||||
};
|
||||
$(function() {
|
||||
$('#file_upload').uploadify({
|
||||
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||
'uploader' : '/admin/data/ref/ac/pdfupload',
|
||||
'multi' : true,
|
||||
'auto' : true,
|
||||
'fileTypeExts' : '*.pdf',
|
||||
'onUploadSuccess' : function(file, data, response) {
|
||||
upload.onsuccess(file, data, response);
|
||||
},
|
||||
'onUploadStart' : function(file) {
|
||||
$('#file_upload').uploadify('settings','formData',param);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var upload = {
|
||||
onsuccess : function(file, data, response){
|
||||
_data = $.parseJSON(data);
|
||||
if(!$.isEmptyObject(_data.error))
|
||||
{
|
||||
alert(_data.error);
|
||||
}else{
|
||||
$('#uploadedFile').append(upload.makeFileHtml(_data));
|
||||
}
|
||||
},
|
||||
makeFileHtml : function(data){
|
||||
return '<div class="alert alert-success">'
|
||||
//+'<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile('+data.id+')"><i class="icon-trash icon-white"></i></button>'
|
||||
+ data.realname
|
||||
+'<input type="hidden" name="attid" value="'+data.id+'"></input>'
|
||||
+'</div>';
|
||||
},
|
||||
deleteFile : function(id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/ref/ac/delete',
|
||||
'data':'attid=' + id,
|
||||
'success':function(data){
|
||||
if(typeof(data) == 'undefined')
|
||||
{
|
||||
alert("数据源错误,请联系管理员");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!$.isEmptyObject(data.error))
|
||||
{
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
alert('附件删除出错');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
|
||||
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data['file']) ?>' />
|
||||
<script>
|
||||
upload.onsuccess('',$('#reference_file_content').val(),"");
|
||||
</script>
|
||||
<?php } ?>
|
|
@ -1,11 +0,0 @@
|
|||
<ul class="nav nav-tabs">
|
||||
<li <?= empty($this->ac) ? 'class="active"':"" ?>><a href="/admin/data/ref">浏览所有</a></li>
|
||||
<li <?= $this->ac=="water" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/water">WATER文献</a></li>
|
||||
<li <?= $this->ac=="westdc" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/westdc">数据中心文献</a></li>
|
||||
<li <?= $this->ac=="todo" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/todo">待处理文献</a></li>
|
||||
<li <?= $this->ac=="add" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/add">单篇添加</a></li>
|
||||
<li <?= $this->ac=="multiupload" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/multiupload">批量上传</a></li>
|
||||
<li <?= $this->ac=="files" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/files">文件管理</a></li>
|
||||
<li <?= $this->ac=="ris" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/ris">RIS导入</a></li>
|
||||
<li <?= $this->ac=="risoutput" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/risoutput">RIS导出</a></li>
|
||||
</ul>
|
|
@ -1,67 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,"uploadify");
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<?php if(empty($this->data)) { ?>
|
||||
<form class="form-horizontal" method="post" enctype="multipart/form-data">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPassword">RIS文件</label>
|
||||
<div class="controls">
|
||||
<input type="file" name="Filedata" id="file_upload" />
|
||||
<div id="uploadedFile"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPassword">RIS文本</label>
|
||||
<div class="controls">
|
||||
<textarea class="input-block-level" name="ristext" rows="5"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<button type="submit" class="btn btn-primary">导入</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php }else{ ?>
|
||||
<?php
|
||||
foreach($this->data as $k=>$ref)
|
||||
{
|
||||
echo '<ul>';
|
||||
foreach($ref as $index=>$value)
|
||||
{
|
||||
$v = is_array($value) ? join("|",$value) : $value;
|
||||
echo '<li>'.$index .":". $v .'</li>';
|
||||
}
|
||||
echo "</ul>";
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,"uploadify");
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<h3>RIS导出</h3>
|
||||
<hr />
|
||||
|
||||
<div>
|
||||
<?php if(!empty($this->years)) { ?>
|
||||
按年份 :
|
||||
<?php foreach($this->years as $k=>$v){ ?>
|
||||
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
|
||||
<?php } ?>
|
||||
<hr />
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
其它方式:<a class="btn btn-info" href="?submit=1&mode=all">全部</a>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
|
@ -1,63 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,"uploadify");
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
<h3><?= empty($this->referenceData['title']) ? $this->referenceData['reference'] : $this->referenceData['title'] ?></h3>
|
||||
<hr />
|
||||
<?php if(empty($this->data)) { ?>
|
||||
<form class="form-horizontal" method="post" enctype="multipart/form-data">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPassword">RIS文本</label>
|
||||
<div class="controls">
|
||||
<textarea class="input-block-level" name="ristext" rows="5"><?= $this->ristext ?></textarea>
|
||||
<span class="help-block">* 此功能是使用单个文献的 RIS 文本导入并覆盖以前填写过的信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<button type="submit" class="btn btn-primary">导入</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php }else{ ?>
|
||||
<?php
|
||||
foreach($this->data as $k=>$ref)
|
||||
{
|
||||
echo '<ul>';
|
||||
foreach($ref as $index=>$value)
|
||||
{
|
||||
$v = is_array($value) ? join("|",$value) : $value;
|
||||
echo '<li>'.$index .":". $v .'</li>';
|
||||
}
|
||||
echo "</ul>";
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
|
@ -1,111 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('文献管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
$this->theme->AppendModel($this,'admin-data-ref');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div>
|
||||
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?= $this->msg ?>
|
||||
<?php } else{ ?>
|
||||
|
||||
<?php if($this->ac == 'westdc'){ ?>
|
||||
<button type="button" class="btn btn-success" onclick="$('#mdref')[0].reset();mdref.edit('','','e31f5ea7-a4af-4ae3-9ac1-1a84132c4338',0,0)">添加数据中心文献</button>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(!empty($this->years)) { ?>
|
||||
<?php foreach($this->years as $k=>$v){ ?>
|
||||
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>标题
|
||||
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
||||
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
||||
年份
|
||||
<a href="?order=year&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
||||
<a href="?order=year&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
||||
</th>
|
||||
<th>记录创建
|
||||
<a href="?order=ts_created&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
||||
<a href="?order=ts_created&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
||||
</th>
|
||||
<th width="140">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($this->page > 1)
|
||||
{
|
||||
$autoindex = ($this->page - 1) * $this->pagelimit;
|
||||
}else{
|
||||
$autoindex=0;
|
||||
}
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<td>
|
||||
[<?= $autoindex ?>]
|
||||
<?php if ($item['ris']) :
|
||||
echo $item['reference'];
|
||||
else :
|
||||
?>
|
||||
{<?php $authors = $this->reference->getAuthorByReference($item['id'],true); echo count($authors) ? join(",",$authors):'<font color="#CC0000">未知作者</font>'; ?>}
|
||||
{<?= empty($item['title']) ? '<font color="#CC0000">未知标题</font>':$item['title'] ?>}
|
||||
{<?= empty($item['publisher']) ? '<font color="#CC0000">未知期刊</font>':$item['publisher'] ?>}
|
||||
{<?= empty($item['year']) ? '<font color="#CC0000">未知年份</font>':$item['year'] ?>}
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?= date("Y-m-d H:i",strtotime($item['ts_created'])) ?></td>
|
||||
<td>
|
||||
<a href="/admin/data/ref/ac/add/id/<?= $item['id']?>">编辑</a>
|
||||
<a href="/admin/data/ref/ac/singleris/id/<?= $item['id'] ?>">RIS编辑</a>
|
||||
<a href="/admin/data/ref/ac/data/id/<?= $item['id'] ?>">数据</a>(<a href="javascript:void(0);" onclick="$('#mdref')[0].reset();mdref.edit('',<?= $item['id']?>,'',0,0)">+</a>)
|
||||
<a href="/admin/data/ref/ac/deleteref/id/<?= $item['id']?>">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType)); ?>
|
|
@ -1,66 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据文献关联管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendModel($this,"author-literature");
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="right_title">数据文献关联管理</div>
|
||||
|
||||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<ul>
|
||||
<li><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
||||
<li><input type="submit" class="btn" value="搜索" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<div class="controlplan">
|
||||
<a href="/admin/data/reference/add/1">添加新的数据文献</a>
|
||||
| <a href="/admin/data/reference/add/1/type/dc">添加数据中心文献</a>
|
||||
| <a href="/admin/data/reference/import/1">导入数据文献文件</a>
|
||||
| <a href="/admin/data/reference/show/e31f5ea7-a4af-4ae3-9ac1-1a84132c4338">查看数据中心文献</a>
|
||||
</div>
|
||||
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php
|
||||
$u='';
|
||||
$i=0;
|
||||
foreach ($this->paginator as $item):
|
||||
if ($u==$item['uuid']) :
|
||||
$i+=1;
|
||||
else :
|
||||
if (!empty($u)) echo '</ol></div>';
|
||||
$i=0;
|
||||
$u=$item['uuid'];
|
||||
endif;
|
||||
if ($i==0) echo '<div class="well"><h4>元数据:<a href="/data/'.$item['uuid'].'">'.$item['mdtitle'].'</a>(<a href="/admin/data/reference/add/1/uuid/'.$item['uuid'].'">添加</a>)</h4><ol>';
|
||||
echo '<li>文献(<a href="/admin/data/reference/edit/'.$item['mdid'].'">编辑</a> <a href="/admin/data/reference/delete/'.$item['mdid'].'">删除</a> <a href="javascript:void(0);" class="order" rel="'.$item['mdid'].'" rev="'.$item['place'].'">排序</a>):'.$item['place'].'. '.$item['reference'].'</li>';
|
||||
endforeach;
|
||||
echo '</ul>';
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<?= $this->paginator; ?>
|
||||
</div>
|
|
@ -1,51 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据文献管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<a href="/admin/data/reference/add/1">添加新的数据文献</a>
|
||||
| <a href="/admin/data/reference/add/1/type/dc">添加数据中心文献</a>
|
||||
| <a href="/admin/data/reference/import/1">导入数据文献文件</a>
|
||||
| <a href="/admin/data/reference/show/e31f5ea7-a4af-4ae3-9ac1-1a84132c4338">查看数据中心文献</a>
|
||||
<?php
|
||||
if($this->type == 'dc')
|
||||
{?>
|
||||
<form id="Reference" enctype="application/x-www-form-urlencoded" action="/admin/data/reference/add/1/" method="post"><dl class="zend_form">
|
||||
<input type="hidden" name="uuid" id="uuid" value="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338" readonly="readonly">
|
||||
<dt id="reference-label"><label for="reference" class="required">文献</label></dt>
|
||||
<dd id="reference-element">
|
||||
<input type="text" name="reference" id="reference" value=""></dd>
|
||||
<dt id="link-label"><label for="link" class="optional">URL(optional)</label></dt>
|
||||
<dd id="link-element">
|
||||
<input type="text" name="link" id="link" value=""></dd>
|
||||
<dt id="reftype-label"><label class="required">文献类型</label></dt>
|
||||
<dd id="reftype-element">
|
||||
<label for="reftype-0"><input type="radio" name="reftype" id="reftype-0" value="0" checked="checked">作者文献</label>
|
||||
<label for="reftype-1"><input type="radio" name="reftype" id="reftype-1" value="1">用户文献</label>
|
||||
<label for="reftype-2"><input type="radio" name="reftype" id="reftype-2" value="2">数据的参考文献</label>
|
||||
<label for="reftype-3"><input type="radio" name="reftype" id="reftype-3" value="3">作者要求的文献引用方式(多篇)</label>
|
||||
</dd>
|
||||
<dt id="submit-label"> </dt><dd id="submit-element">
|
||||
<input type="submit" name="submit" id="submitbutton" value="发送"></dd></dl></form>
|
||||
<?php }
|
||||
else ?><?= $this->form; ?>
|
||||
</div>
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据文献管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<a href="/admin/data/reference/add/1">添加新的数据文献</a> | <a href="/admin/data/reference/import/1">导入数据文献文件</a>
|
||||
<form enctype="multipart/form-data" method="POST">
|
||||
<!-- MAX_FILE_SIZE must precede the file input field -->
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
|
||||
<!-- Name of input element determines name in $_FILES array -->
|
||||
上传数据文献文件: <br />
|
||||
<input name="ref" type="file" /><br />
|
||||
<input type="submit" value="导入" />
|
||||
</form>
|
||||
</div>
|
|
@ -1,68 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('项目来源管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ctrlplan">
|
||||
<a href="/admin/data/source">项目来源管理</a>
|
||||
<a href="/admin/data/source/do/add">添加项目来源</a>
|
||||
<a href="/admin/data/source/do/sync">同步项目来源(以此处为准)</a>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
<label>搜索关键字</label><input type="text" class="q" name="q" value="<?php echo $this->q; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table class="stylized" width="700">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width='40%'>标题</td>
|
||||
<td width='30%'>Code字符</td>
|
||||
<td width='30%'>操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><a href="/admin/data/source/do/fetch/id/<?php echo $item['id']?>"><?php echo $item['title']; ?></a></td>
|
||||
<td><?php echo $item['code'];?></td>
|
||||
<td>
|
||||
<a href="/admin/data/source/do/edit/id/<?php echo $item['id']?>">查看编辑</a>|
|
||||
<a href="/admin/data/source/do/fetch/id/<?php echo $item['id']?>">查看元数据</a>|
|
||||
<a href="/admin/data/source/do/del/id/<?php echo $item['id']?>" onclick="return confirm('是否确定删除该来源')">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
|
|
@ -1,64 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('项目来源管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ctrlplan">
|
||||
<a href="/admin/data/source/">项目来源管理</a>
|
||||
<a href="/admin/data/source/do/add">添加项目来源</a>
|
||||
</div>
|
||||
<form method="post" action="/admin/data/source">
|
||||
<p>
|
||||
<label>标题:</label><br />
|
||||
<input type="text" name="title" value="<?php echo $this->info['title'];?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label class="required">uuid:</label><br />
|
||||
<input type="text" name="uuid" value="<?php echo $this->info['uuid'];?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label class="required">Code:</label><br />
|
||||
<input type="text" name="code" value="<?php echo $this->info['code'];?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label>描述</label><br />
|
||||
<textarea id="description" class="samll half" name="description"><?php echo $this->info['description'];?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label>has_pages</label><br />
|
||||
<input type="radio" name="has_pages" value="true" <?php if($this->info['has_pages']) echo 'checked="checked"';?> />True <input type="radio" name="has_pages" value="false" <?php if(!$this->info['has_pages']) echo 'checked="checked"';?> />False
|
||||
</p>
|
||||
<p>
|
||||
<label>has_agreement</label><br />
|
||||
<input type="radio" name="has_agreement" value="true" <?php if($this->info['has_agreement']) echo 'checked="checked"';?> />True <input type="radio" name="has_agreement" value="false" <?php if(!$this->info['has_agreement']) echo 'checked="checked"';?> />False
|
||||
</p>
|
||||
<p>
|
||||
<input type="hidden" name="id" value="<?php echo $this->info['id'];?>" />
|
||||
<input type="hidden" name="do" value="<?php if($this->info['uuid']!='') echo 'edit';else echo 'add';?>" />
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<input type="submit" value="提交" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
|
@ -1,64 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('项目来源管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ctrlplan">
|
||||
<a href="/admin/data/source">项目来源管理</a>
|
||||
<a href="/admin/data/source/do/add">添加项目来源</a>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
<label>搜索关键字</label><input type="text" class="q" name="q" value="<?php echo $this->q; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table class="stylized" width="700">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width='85%'>标题</td>
|
||||
<td width='15%'>操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
|
||||
<td>
|
||||
<a href="/admin/data/source/do/datasource/uuid/<?php echo $item['uuid'];?>">编辑数据来源</a><br />
|
||||
<a href="/admin/data/source/do/delsource/id/<?php echo $item['id']?>/uuid/<?php echo $item['uuid'];?>" onclick="return confirm('是否确定删除该来源')">清除数据来源</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
|
|
@ -1,91 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('项目来源管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
为元数据《<?php echo $this->info['title'];?>》选择项目来源
|
||||
|
||||
<div class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||
<label>搜索关键字</label><input type="text" class="q" name="q" value="<?php echo $this->q; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
|
||||
<form method="post">
|
||||
<table class="stylized" width="700">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width='10%'>选择</td>
|
||||
<td width='30%'>标题</td>
|
||||
<td width='30%'>Code字符</td>
|
||||
<td width='30%'>操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><input type="radio" name="sourceid" value="<?php echo $item['id'];?>" <?php if($item['id']==$this->info['sourceid']) echo 'checked="checked"'; ?> /></td>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
|
||||
<td><?php echo $item['code'];?></td>
|
||||
<td><a href="/admin/data/source/do/edit/id/<?php echo $item['id']?>">查看编辑</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<input type="hidden" name="uuid" value="<?php echo $this->uuid;?>" />
|
||||
<input type="hidden" name="do" value="datasource" />
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<?php
|
||||
if(!empty($this->info['id']))
|
||||
{
|
||||
echo "此元数据已经选择了项目来源:".$this->info['stitle']."[".$this->info['code']."],操作将更改此元数据现有的项目来源<br />";
|
||||
}
|
||||
?>
|
||||
<input type="submit" value="提交" />
|
||||
</form>
|
||||
<?php
|
||||
if(!empty($this->info['id']))
|
||||
{
|
||||
?>
|
||||
<form method="post" action="/admin/data/source/">
|
||||
<input type="hidden" name="uuid" value="<?php echo $this->uuid;?>" />
|
||||
<input type="hidden" name="do" value="delsource" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->info['id'];?>" />
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<br /><button type="submit" class="btn btn-red" onclick="return confirm('是否确定删除该来源')">清除数据来源</button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('同步GEONETWORK元数据</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p>WESTDC有元数据<?php echo $this->mdcount->westdccount; ?>条,GEONETWORK有元数据<?php echo $this->mdcount->gncount; ?>条。</p>
|
||||
<p><a href="/admin/data/sync/source/geonetwork">开始同步:从GEONETWORK同步到WESTDC,若有冲突,以GEONETWORK为准</a> </p>
|
||||
<p><a href="/admin/data/sync/source/westdc">开始同步:从WESTDC同步到GEONETWORK</a> </p>
|
||||
<p><a href="/admin/data/sync/list/westdc">列出WESTDC中多出的数据</a></p>
|
||||
<p><a href="/admin/data/sync/list/geonetwork">列出GeoNetwork中多出的元数据</a></p>
|
||||
<p><a href="/admin/data/sync/delete/westdc">删除WESTDC中多出的元数据</a></p>
|
||||
<p><a href="/admin/data/sync/delete/geonetwork">删除GEONETWORK中多出的元数据</a></p>
|
||||
<p><a href="/admin/data/sync/thumb/geonetwork">同步GEONETWORK中的缩略图</a></p>
|
||||
<form method="POST">
|
||||
<p>指定元数据UUID: <input type="text" name="uuid"></p>
|
||||
<button type="submit" name="submit">同步此元数据</button>
|
||||
<button type="submit" name="gnsubmit">同步数据到GeoNetwork</button>
|
||||
</form>
|
||||
<?php if ($this->metadata) : ?>
|
||||
<ul>
|
||||
<?php foreach ($this->metadata as $md) :
|
||||
if (empty($md->id)) :
|
||||
?>
|
||||
<li><a href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title;?></a></li>
|
||||
<?php else : ?>
|
||||
<li><a href="/service/geonetwork?url=metadata.show?id=<?php echo $md->id; ?>"><?php echo $md->title;?></a></li>
|
||||
<?php endif;endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据版本管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version/">所有版本概况</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<form id="datasearch" class="search_form" action="/admin/data/version/ac/bydata">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li>
|
||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></p>
|
||||
<p>数据库中共有版本数:<?php echo $item['c'];?> (<a href="/admin/data/version/uuid/<?php echo $item['uuid'];?>">查看详细</a>)</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
</script>
|
|
@ -1,70 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
//$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/diffview.js');
|
||||
$this->headScript()->appendFile('/js/difflib.js');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/diffview.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('查看数据作者');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version">所有版本概况</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
if(!empty($this->error))
|
||||
{
|
||||
echo $this->error;
|
||||
}
|
||||
else
|
||||
{?>
|
||||
<h2><?php echo $this->info['title'];?></h2>
|
||||
<div id="diffoutput" style="width:100%"> </div>
|
||||
<textarea id="basetext" style="display:none;"><?php echo $this->data[1]['xml'];?></textarea>
|
||||
<textarea id="newtext" style="display:none;"><?php echo $this->data[0]['xml'];?></textarea>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
function diffUsingJS() {
|
||||
var base = difflib.stringAsLines($('#basetext').val());
|
||||
var newtxt = difflib.stringAsLines($('#newtext').val());
|
||||
|
||||
var sm = new difflib.SequenceMatcher(base, newtxt);
|
||||
|
||||
var opcodes = sm.get_opcodes();
|
||||
|
||||
$("#diffoutput").append(diffview.buildView({
|
||||
baseTextLines: base,
|
||||
newTextLines: newtxt,
|
||||
opcodes: opcodes,
|
||||
// set the display titles for each resource
|
||||
baseTextName: "<?php echo date("Y-m-d H:i",strtotime($this->data[1]['ts_created'])); ?>",
|
||||
newTextName: "<?php echo date("Y-m-d H:i",strtotime($this->data[0]['ts_created'])); ?>",
|
||||
contextSize: null,
|
||||
viewType: 0
|
||||
}));
|
||||
}
|
||||
diffUsingJS();
|
||||
</script>
|
|
@ -1,117 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据版本管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow <?php if(!$this->mdtitle) echo "active";?>"><a class="text-shadow" href="/admin/data/version">所有版本概况</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
$edited=false;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li id="list_<?php echo $item['id'];?>">
|
||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a>
|
||||
【<a href="/admin/data/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a>
|
||||
<?php
|
||||
if (!$edited && @$item['gid'])
|
||||
{
|
||||
$edited=true;
|
||||
echo '<a href="/service/geonetwork?url=metadata.edit?id='.$item['gid'].'" target="_blank">编辑最新版本</a> ';
|
||||
}
|
||||
?>
|
||||
】</p>
|
||||
<p>版本创建时间: <?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?>
|
||||
<?php if ($item['userid']) :
|
||||
echo "发布人: ".(empty($item['realname'])?$item['username']:$item['realname'])." ";
|
||||
endif;
|
||||
?>
|
||||
【<a onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete','<?php echo $item['id'];?>');" class="more">删除</a>
|
||||
<a onclick="return confirm('是否确定将这个版本恢复到geonetwork?');" href="javascript:action('restore','<?php echo $item['id'];?>');" class="more">恢复到geonetwork</a>
|
||||
<a href="/admin/data/version/ac/diff/id/<?php echo $item['id'];?>" class="more">与前一版对比</a>
|
||||
<a href="/admin/data/version/ac/diff1/id/<?php echo $item['id'];?>" class="more">与前一发布或提交版对比</a>
|
||||
<a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
|
||||
】</p>
|
||||
<?php if ($item['changelog']) : ?>
|
||||
<p><?php echo $item['changelog']; ?></p>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
function action(ac,id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/data/version/',
|
||||
'data':'ac='+ ac +'&id='+id,
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{$.colorbox({'innerWidth':'50%','html':data.error});}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#list_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
|
||||
if(typeof(data.commited)!='undefined')
|
||||
{$('#changelog').val('');$('#commit_submit').attr('onclick','');}
|
||||
}
|
||||
else{
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>出现错误,请稍候再试</h4>'});
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
});
|
||||
}
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function commit(id){
|
||||
action('commit&changelog='+$('#changelog').val(),id);
|
||||
}
|
||||
</script>
|
||||
<div class="colorbox" style="display:none;">
|
||||
<div id="commitform">
|
||||
<form>
|
||||
<p>
|
||||
<label>版本改动:</label><br />
|
||||
<textarea class="full" style="resize:none;height:200px;" id="changelog"></textarea>
|
||||
<br /><small>请输入此版本与之前版本的差别</small>
|
||||
</p>
|
||||
<input type="button" onclick="" id="commit_submit" class="btn btn-green big" value="提交"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div>
|
||||
<div class="ok"><img src="/images/alert_big_ok.png" /><span></span></div>
|
||||
<div class="warning"><img src="/images/alert_big_warning.png" /><span></span></div>
|
||||
</div>
|
|
@ -1,62 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('在线下载记录');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/prototype.js');
|
||||
?>
|
||||
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</div>
|
||||
|
||||
<div class="search">
|
||||
<form action="/admin/down/data/" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<ul>
|
||||
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table><thead>
|
||||
<tr>
|
||||
<td width='350'>数据</td>
|
||||
<td width='150'>下载次数</td>
|
||||
<td width='150'>操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
||||
<td><?php echo $item['num']; ?></td>
|
||||
<td>
|
||||
<a href='/admin/down/data/show/<?php echo $item['uuid'];?>'>详细</a>
|
||||
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,58 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="right_title">离线申请中可能与网站会员关联的账户列表 (<?php echo $this->count;?> 条)</div>
|
||||
<div><a href="/admin/down/fixoffline/nouserid/1">查看所有无用户ID的申请记录</a></div>
|
||||
<form action="" method="get">
|
||||
<table><thead>
|
||||
<tr>
|
||||
<td width='30'>选择</td>
|
||||
<td width='80'>离线申请ID</td>
|
||||
<td width='100'>离线申请姓名</td>
|
||||
<td width='250'>离线申请单位</td>
|
||||
<td width='100'>用户名</td>
|
||||
<td width='100'>用户姓名</td>
|
||||
<td width='250'>用户单位</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><input type="checkbox" name="orders[]" value="<?php echo $item['uid']?>,<?php echo $item['oid']?>" /></td>
|
||||
<td><?php echo $item['oid']?></td>
|
||||
<td><a href="/admin/down/offline/show/<?php echo $item['oid']; ?>"><?php echo $item['un'];?></a></td>
|
||||
<td><?php echo $item['uu']; ?></td>
|
||||
<td><a href="/admin/user/show/id/<?php echo $item['uid']; ?>"><?php echo $item['username'];?></a></td>
|
||||
<td><?php echo $item['rn']; ?></td>
|
||||
<td><?php echo $item['unit'];?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div style="width:100%;text-align:left;">
|
||||
<input type="hidden" name="fix" value='1' />
|
||||
<input type="submit" value="匹配已选择的记录" onclick="return confirm('是否确定匹配这些用户')" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('申请管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
</div>
|
|
@ -1,10 +0,0 @@
|
|||
<ul>
|
||||
<li class="title">申请管理与在线下载记录</li>
|
||||
<li><a href="/admin/down/offlineapp">离线数据申请管理</a></li>
|
||||
<li><a href="/admin/down/offlineapps">离线数据申请管理(新)</a></li>
|
||||
<li><a href="/admin/down/offline">离线数据服务记录</a></li>
|
||||
<li><a href="/admin/down/fixoffline">手动同步离线申请用户与网站帐号</a></li>
|
||||
<li><a href="/admin/down/online">在线数据下载记录(从20110908开始)</a></li>
|
||||
<li><a href="/admin/down/user">用户下载记录</a></li>
|
||||
<li><a href="/admin/down/data">数据下载记录</a></li>
|
||||
</ul>
|
|
@ -1,61 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('离线数据申请管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="right_title">所有无网站用户信息的离线数据服务记录 <?php echo $this->count;?>条</div>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table>
|
||||
<thead><tr>
|
||||
<th width='70'>姓名</th>
|
||||
<th width='150'>单位</th>
|
||||
<th width='150'>地址</th>
|
||||
<th width='50'>邮编</th>
|
||||
<th width='300'>用途</th>
|
||||
<th width='300'>数据清单</th>
|
||||
<th width='120'>申请时间</th>
|
||||
<th width='100'>操作</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
||||
<td><?= $item['unit']; ?></td>
|
||||
<td><?= $item['address']; ?></td>
|
||||
<td><?= $item['postcode']; ?></td>
|
||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['project']; ?></textarea></td>
|
||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
|
||||
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
||||
<td>
|
||||
<a href="/admin/down/offline/edit/<?= $item['id']; ?>">编辑</a> |
|
||||
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
|
||||
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
|
||||
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody></table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,127 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('离线数据申请管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="right_title">离线数据服务记录</div>
|
||||
<a href="/admin/down/offline/add/1">添加新的离线服务记录</a> | <a href="/admin/down/offline/down/1">下载所有离线服务记录</a> | <a href="/admin/down/offline/update/1" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a> | <a href="/admin/down/offline/emaillist/1">下载服务用户邮箱列表</a>
|
||||
| <a href="/admin/down/offline/monthreport/1">下载上月服务记录(科技部上报)</a>
|
||||
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table>
|
||||
<thead><tr>
|
||||
<th width='70'>姓名</th>
|
||||
<th width='150'>单位</th>
|
||||
<th width='150'>地址</th>
|
||||
<th width='50'>邮编</th>
|
||||
<th width='300'>用途</th>
|
||||
<th width='300'>数据清单</th>
|
||||
<th width='120'>申请时间</th>
|
||||
<th width='100'>操作</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
||||
<td><?= $item['unit']; ?></td>
|
||||
<td><?= $item['address']; ?></td>
|
||||
<td><?= $item['postcode']; ?></td>
|
||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></textarea></td>
|
||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
|
||||
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
||||
<td>
|
||||
<a href="/admin/down/offline/edit/<?= $item['id']; ?><?php if(empty($this->page)) "" ; else echo "/page/".$this->page; ?>">编辑</a> |
|
||||
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
|
||||
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
|
||||
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> |
|
||||
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定重新通过该申请?')">重新通过</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody></table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<script>
|
||||
function action(name,id){
|
||||
var url;
|
||||
if(name == "start")
|
||||
{url = '/admin/down/offlineapp/start/'+id;}
|
||||
if(name == "finish")
|
||||
{url = '/admin/down/offlineapp/finish/'+id;}
|
||||
if(name == "deleted")
|
||||
{url = '/admin/down/offlineapp/cancel/'+id;}
|
||||
if(name == "deny")
|
||||
{url = '/admin/down/offlineapp/deny/'+id;}
|
||||
if(name == "reset")
|
||||
{url = '/admin/down/offlineapp/reset/'+id;}
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':url,
|
||||
'data':'',
|
||||
'success':OnDataLoad,
|
||||
'timeout': 30000,
|
||||
'error': AjaxError
|
||||
});
|
||||
}
|
||||
function OnDataLoad(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.started)!='undefined')
|
||||
{$('#start_'+data.started).remove();}
|
||||
if(typeof(data.finish) != 'undefined')
|
||||
{$('#list_'+data.finish).fadeOut();}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
}
|
||||
function AjaxError(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('离线数据服务记录管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<a href="/admin/down/offline/add/1">添加新的离线服务记录</a>
|
||||
<?= $this->form; ?>
|
||||
</div>
|
|
@ -1,196 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->Theme->AppendPlus($this,'colorbox');
|
||||
$this->Theme->AppendPlus($this,'uploadify');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('离线数据申请管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="right_title">离线数据申请管理</div>
|
||||
|
||||
<a href="/admin/down/offlineapp/reset/-1" onclick="return confirm('是否重置该申请?')">重置1年前的所有未收到申请表的记录</a>
|
||||
| <a href="/admin/down/offlineapp/status/4">已收到的申请</a>
|
||||
| <a href="/admin/down/offlineapp/status/-1">已拒绝的申请</a>
|
||||
| <a href="/admin/down/offlineapp/ac/pending">待处理的申请</a>
|
||||
| <a href="/admin/down/offline">已通过的申请(离线服务记录)</a>
|
||||
<div class="search">
|
||||
<form action="/admin/down/offlineapp" method="get">
|
||||
<input name="search" value="1" type="hidden">
|
||||
<ul>
|
||||
<li><input name="q" value="" type="text" placeholder="搜索关键字"></li>
|
||||
<li><input class="searchbtn" value="搜索" type="submit"></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li id="list_<?php echo $item['id'];?>">
|
||||
<p>
|
||||
<?= $autoindex ?>.
|
||||
<a href="mailto:<?= $item['email']; ?>?subject=答复数据申请问题"><?= $item['username']; ?></a> |
|
||||
申请时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
|
||||
<?php if(!empty($item['ts_received'])) echo " | 收到时间:".date('Y-m-d',strtotime($item['ts_received']));?>
|
||||
</p>
|
||||
<p>
|
||||
单位:<?= $item['unit']; ?> |
|
||||
地址:<?= $item['address']; ?> |
|
||||
邮编:<?= $item['postcode']; ?>
|
||||
</p>
|
||||
<p>
|
||||
用途:
|
||||
<p style="width:95%;margin:0px auto;"><q><cite><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></cite></q></p>
|
||||
</p>
|
||||
<p>
|
||||
数据清单:<?= $item['datalist']; ?>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">原始申请表</a> |
|
||||
<?php if ($item['datastatus']==3) : ?>
|
||||
<span id="start_<?= $item['id']; ?>"><a href="javascript:action('start',<?= $item['id']; ?>);" onclick="return confirm('确定收到该申请?')">收到</a></span> |
|
||||
<?php endif; ?>
|
||||
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定通过该申请?')">通过</a> |
|
||||
<a href="javascript:action('deleted',<?= $item['id']; ?>);" onclick="return confirm('确定将此记录删除?')">删除</a> |
|
||||
<a href="javascript:action('deny',<?= $item['id']; ?>);" onclick="return confirm('确定拒绝该申请?')">拒绝</a> |
|
||||
<a href="javascript:action('reset',<?= $item['id']; ?>);" onclick="return confirm('是否重置该申请?')">重置</a> |
|
||||
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传签字申请表</a>
|
||||
<?php if(!empty($item['applicationform'])) { ?>
|
||||
| <a href="/admin/down/applicationform/ac/view/?link=<?= urlencode($item['applicationform'])?>">查看签字申请表</a>
|
||||
| <a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否重置该申请表?')">重置申请表</a>
|
||||
<?php }?>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="upload-form" class="modal hide fade" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel">申请表上传</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="application-form">
|
||||
<div id="fsUploadProgress">允许上传30M以内的 PDF 文件</div>
|
||||
<input type="file" name="Filedata" id="file_upload" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
|
||||
<button class="btn btn-primary">上传完成</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//var param = {};
|
||||
//var upload_count = 0;
|
||||
var uploader;
|
||||
var param;
|
||||
$(function() {
|
||||
$('#file_upload').uploadify({
|
||||
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||
'uploader' : '/admin/down/uploadapplicationform',
|
||||
'multi' : false,
|
||||
'auto' : true,
|
||||
'fileTypeExts' : '*.pdf; *.jpg',
|
||||
'onUploadSuccess' : function(file, data, response) {
|
||||
upload.onsuccess(file, data, response);
|
||||
},
|
||||
'onUploadStart' : function(file) {
|
||||
$('#file_upload').uploadify('settings','formData',param);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var upload = {
|
||||
onsuccess : function(file, data, response){
|
||||
_data = $.parseJSON(data);
|
||||
if(!$.isEmptyObject(_data.error))
|
||||
{
|
||||
alert(_data.error);
|
||||
}else{
|
||||
$('#upload-form').modal('hide');
|
||||
window.location = window.location;
|
||||
}
|
||||
},
|
||||
showUploadForm : function(id){
|
||||
$('#upload-form').modal('show');
|
||||
param = {
|
||||
"PHPSESSID" : "<?php echo session_id(); ?>",
|
||||
'orderid' : id
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
function action(name,id){
|
||||
var url;
|
||||
if(name == "start")
|
||||
{url = '/admin/down/offlineapp/start/'+id;}
|
||||
if(name == "finish")
|
||||
{url = '/admin/down/offlineapp/finish/'+id;}
|
||||
if(name == "deleted")
|
||||
{url = '/admin/down/offlineapp/cancel/'+id;}
|
||||
if(name == "deny")
|
||||
{url = '/admin/down/offlineapp/deny/'+id;}
|
||||
if(name == "reset")
|
||||
{url = '/admin/down/offlineapp/reset/'+id;}
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':url,
|
||||
'data':'',
|
||||
'success':OnDataLoad,
|
||||
'timeout': 30000,
|
||||
'error': AjaxError
|
||||
});
|
||||
}
|
||||
function OnDataLoad(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.started)!='undefined')
|
||||
{$('#start_'+data.started).remove();}
|
||||
if(typeof(data.finish) != 'undefined')
|
||||
{$('#list_'+data.finish).fadeOut();}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
}
|
||||
function AjaxError(){
|
||||
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
$(".inline").colorbox({inline:true, width:"50%"});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
</script>
|
|
@ -1,15 +0,0 @@
|
|||
<ul class="nav nav-pills">
|
||||
<li class="<?= $this->navIn == "notreceived" ? "active":"" ?>">
|
||||
<a href="/admin/down/offlineapps/ac/notreceived">未接收</a>
|
||||
</li>
|
||||
<li class="<?= $this->navIn == "nopdf" ? "active":"" ?>">
|
||||
<a href="/admin/down/offlineapps/ac/nopdf">已接收未上传申请表</a>
|
||||
</li>
|
||||
<li class="<?= $this->navIn == "notpassed" ? "active":"" ?>">
|
||||
<a href="/admin/down/offlineapps/ac/notpassed">待审批</a>
|
||||
</li>
|
||||
<li class="<?= $this->navIn == "passed" ? "active":"" ?>">
|
||||
<a href="/admin/down/offlineapps/ac/passed">已上传申请表已通过</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
|
@ -1,73 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->Theme->AppendPlus($this,'colorbox');
|
||||
$this->Theme->AppendPlus($this,'uploadify');
|
||||
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||
$this->Theme->AppendModel($this,'sfadmin');
|
||||
function applicationform($form)
|
||||
{
|
||||
if(empty($form))
|
||||
{
|
||||
return "未提交";
|
||||
}else{
|
||||
return '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||
|
||||
<form action="" method="get" class="search input-append">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<button type="submit" class="btn">搜索</button>
|
||||
</form>
|
||||
|
||||
<table class="table table-bordered table-hover"><thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||
<th>申请者</th>
|
||||
<th>提交时间</th>
|
||||
<th>申请表</th>
|
||||
<th>操作</th>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
|
||||
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||
<td><?= applicationform($item['applicationform']) ?></td>
|
||||
<td>
|
||||
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
|
||||
<a href="/admin/down/offlineapps/ac/receive/?offlineappid=<?= $item['id'] ?>">接收</a>
|
||||
<a href="/admin/down/offlineapps/ac/return/?offlineappid=<?= $item['id'] ?>">退回</a>
|
||||
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
|
||||
</div><!-- span9 -->
|
||||
</div>
|
||||
<script>
|
||||
var _this = {};
|
||||
sfadmin.init();
|
||||
</script>
|
||||
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -1,73 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->Theme->AppendPlus($this,'colorbox');
|
||||
$this->Theme->AppendPlus($this,'uploadify');
|
||||
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||
$this->Theme->AppendModel($this,'sfadmin');
|
||||
function applicationform($form)
|
||||
{
|
||||
if(empty($form))
|
||||
{
|
||||
return "未提交";
|
||||
}else{
|
||||
return '<a href="/admin/down/applicationform/ac/view?link='.$form.'">查看</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||
|
||||
<form action="" method="get" class="search input-append">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<button type="submit" class="btn">搜索</button>
|
||||
</form>
|
||||
|
||||
<table class="table table-bordered table-hover"><thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||
<th>申请者</th>
|
||||
<th>提交时间</th>
|
||||
<th>申请表</th>
|
||||
<th>操作</th>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
|
||||
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||
<td><?= applicationform($item['applicationform']) ?></td>
|
||||
<td>
|
||||
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
|
||||
<a href="/admin/down/offlineapps/ac/toauthor/?offlineappid=<?= $item['id'] ?>">发给作者</a>
|
||||
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
|
||||
<a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否确认重置该用户的申请表?')">重置申请表</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
|
||||
</div><!-- span9 -->
|
||||
</div>
|
||||
<script>
|
||||
var _this = {};
|
||||
sfadmin.init();
|
||||
</script>
|
||||
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -1,74 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->Theme->AppendPlus($this,'colorbox');
|
||||
$this->Theme->AppendPlus($this,'uploadify');
|
||||
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||
$this->Theme->AppendModel($this,'sfadmin');
|
||||
function applicationform($form)
|
||||
{
|
||||
if(empty($form))
|
||||
{
|
||||
return "未提交";
|
||||
}else{
|
||||
return '<a href="/admin/down/applicationform/ac/view?link='.$form.'">查看</a> <a href="/admin/down/applicationform/ac/download?link='.$form.'">下载</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||
|
||||
<form action="" method="get" class="search input-append">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<button type="submit" class="btn">搜索</button>
|
||||
</form>
|
||||
|
||||
<table class="table table-bordered table-hover"><thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||
<th>申请者</th>
|
||||
<th>提交时间</th>
|
||||
<th>申请表</th>
|
||||
<th>操作</th>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
|
||||
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||
<td><?= applicationform($item['applicationform']) ?></td>
|
||||
<td>
|
||||
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
|
||||
<a href="/admin/down/offlineapps/ac/receive/?offlineappid=<?= $item['id'] ?>">接收</a>
|
||||
<a href="/admin/down/offlineapps/ac/deny/offlineappid/<?= $item['id'] ?>">退回</a>
|
||||
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
|
||||
<a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否确认重置该用户的申请表?')">重置申请表</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
|
||||
</div><!-- span9 -->
|
||||
</div>
|
||||
<script>
|
||||
var _this = {};
|
||||
sfadmin.init();
|
||||
</script>
|
||||
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->Theme->AppendPlus($this,'colorbox');
|
||||
$this->Theme->AppendPlus($this,'uploadify');
|
||||
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||
$this->Theme->AppendModel($this,'sfadmin');
|
||||
function applicationform($form)
|
||||
{
|
||||
if(empty($form))
|
||||
{
|
||||
return "未提交";
|
||||
}else{
|
||||
return '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||
|
||||
<h2>发给作者</h2>
|
||||
|
||||
|
||||
|
||||
</div><!-- span9 -->
|
||||
</div>
|
||||
<script>
|
||||
var _this = {};
|
||||
sfadmin.init();
|
||||
</script>
|
||||
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -1,19 +0,0 @@
|
|||
<div id="upload-form" class="modal hide fade" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel">申请表上传</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="application-form">
|
||||
<div id="fsUploadProgress">允许上传20M以内的 PDF 文件</div>
|
||||
<input type="file" name="Filedata" id="file_upload" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
|
||||
<button class="btn btn-primary">上传完成</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
_this.SessionID = '<?php echo session_id(); ?>';
|
||||
</script>
|
|
@ -1,63 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->Theme->AppendPlus($this,'colorbox');
|
||||
$this->Theme->AppendPlus($this,'uploadify');
|
||||
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||
$this->Theme->AppendModel($this,'sfadmin');
|
||||
function applicationform($form)
|
||||
{
|
||||
if(empty($form))
|
||||
{
|
||||
return "未提交";
|
||||
}else{
|
||||
return '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||
|
||||
<h2>查看详细</h2>
|
||||
|
||||
<ul>
|
||||
<li>申请者:<?= $this->data[0]['username'] ?></li>
|
||||
<li>单位:<?= $this->data[0]['unit'] ?></li>
|
||||
<li>电话:<?= $this->data[0]['phone'] ?></li>
|
||||
<li>地址:<?= $this->data[0]['address'] ?></li>
|
||||
<li>邮编:<?= $this->data[0]['postcode'] ?></li>
|
||||
<li>未签字pdf:<?= $this->data[0]['pdflink'] ?></li>
|
||||
<li>签字pdf:<?= ( isset($this->data[0]['applicationform']) && !empty($this->data[0]['applicationform'])) ? '<a href="">查看</a> <a href="">下载</a>':"未提交"?></li>
|
||||
<li>数据列表:<?= $this->data[0]['datalist'] ?></li>
|
||||
<li>邮箱:<?= $this->data[0]['email'] ?></li>
|
||||
|
||||
<li>项目编号:<?= $this->data[0]['project_id'] ?></li>
|
||||
<li>项目类型:<?= $this->data[0]['project_type'] ?></li>
|
||||
<li>项目名称:<?= $this->data[0]['project_title'] ?></li>
|
||||
<li>项目负责人:<?= $this->data[0]['leader'] ?></li>
|
||||
<li>项目负责人职称:<?= $this->data[0]['leadertitle'] ?></li>
|
||||
<li>项目介绍:<?= $this->data[0]['project'] ?></li>
|
||||
|
||||
<li>申请时间:<?= $this->data[0]['ts_created'] ?></li>
|
||||
<li>接收时间:<?= $this->data[0]['ts_received'] ?></li>
|
||||
<li>通过时间:<?= $this->data[0]['ts_approved'] ?></li>
|
||||
</ul>
|
||||
|
||||
</div><!-- span9 -->
|
||||
</div>
|
||||
<script>
|
||||
var _this = {};
|
||||
sfadmin.init();
|
||||
</script>
|
||||
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||
|
||||
<form action="" method="get" class="search input-append">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<button type="submit" class="btn">搜索</button>
|
||||
</form>
|
||||
|
||||
<table class="table table-bordered table-hover"><thead>
|
||||
<tr>
|
||||
<th width='600'>元数据标题</th>
|
||||
<th width='120'>责任编辑</th>
|
||||
<th width='120'>接收时间</th>
|
||||
<th width='180'>操作</th>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
|
||||
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||
<td>
|
||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">分配编辑</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
|
||||
</div><!-- span9 -->
|
||||
</div>
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('详细信息');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/prototype.js');
|
||||
?>
|
||||
<div id="divContent">
|
||||
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div id="rightPanel">
|
||||
<table>
|
||||
<tr><td width='80'>姓名</td><td><?php echo $this->infos['username'];?></td></tr>
|
||||
<tr><td>单位</td><td><?php echo $this->infos['unit'];?></td></tr>
|
||||
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
|
||||
<tr><td>地址</td><td><?php echo $this->infos['address'];?></td></tr>
|
||||
<tr><td>邮编</td><td><?php echo $this->infos['postcode'];?></td></tr>
|
||||
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
|
||||
<tr><td>Email</td><td><?php echo $this->infos['email'];?></td></tr>
|
||||
<tr><td>用途</td><td><textarea style="width:500px;height:200px;font-size:12px;" readonly="readonly"><?php echo $this->infos['project'];?></textarea></td></tr>
|
||||
<tr><td>时间</td><td><?php echo date('Y-m-d H:i:s', strtotime($this->infos['ts_created']));?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
|
@ -1,70 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('在线数据下载记录</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div id="rightPanel">
|
||||
|
||||
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共有 <?php echo $this->count;?> 条在线下载记录</div>
|
||||
|
||||
<div class="search">
|
||||
<form action="/admin/down/search/" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<ul>
|
||||
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width='100'>姓名</td>
|
||||
<td width='150'>单位</td>
|
||||
<td width='350'>数据</td>
|
||||
<td width='300'>用途</td>
|
||||
<td width='120'>下载时间</td>
|
||||
<td width='100'>操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a><a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
||||
<td><?= $item['unit']?></td>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?php echo $item['project']; ?></textarea></td>
|
||||
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
|
||||
<td>
|
||||
<a href='/admin/down/online/show/<?php echo $item['id'];?>'>详细</a>
|
||||
<a href='/admin/down/online/delete/<?= $item['id'];?>/' onclick="return confirm('确定将此记录删除?')">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('详细信息');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/prototype.js');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div id="rightPanel">
|
||||
<table>
|
||||
<tr><td>用户</td><td><a href="/admin/user/show/id/<?php echo $this->infos['uid'];?>"><?php echo $this->infos['uname'];?> </a> (<a href="/admin/down/user/show/<?php echo $this->infos['uid'];?>">用户下载记录 </a>)</td></tr>
|
||||
<tr><td>姓名</td><td><?php echo $this->infos['username'];?></td></tr>
|
||||
<tr><td>数据</td><td><a href="/data/<?php echo $this->infos['uuid'];?>"><?php echo $this->infos['title'];?></a>(<a href="/admin/down/data/show/<?php echo $this->infos['uuid'];?>">数据下载记录</a>)</td></tr>
|
||||
<tr><td>单位</td><td><?php echo $this->infos['unit'];?></td></tr>
|
||||
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
|
||||
<tr><td>地址</td><td><?php echo $this->infos['address'];?></td></tr>
|
||||
<tr><td>邮编</td><td><?php echo $this->infos['postcode'];?></td></tr>
|
||||
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
|
||||
<tr><td>Email</td><td><?php echo $this->infos['email'];?></td></tr>
|
||||
<tr><td>用途</td><td><textarea style="width:500px;height:200px;font-size:12px;"><?php echo $this->infos['project'];?></textarea></td></tr>
|
||||
<tr><td>项目编号</td><td><?php echo $this->infos['project_id'];?></td></tr>
|
||||
<tr><td>项目标题</td><td><?php echo $this->infos['project_title'];?></td></tr>
|
||||
<tr><td>项目类型</td><td><?php echo $this->infos['project_type'];?></td></tr>
|
||||
<tr><td>项目信息</td><td><?php echo $this->infos['project'];?></td></tr>
|
||||
<tr><td>时间</td><td><?php echo date('Y-m-d H:i:s', strtotime($this->infos['ts_created']));?></td></tr>
|
||||
</table>
|
||||
</div>
|
|
@ -1,96 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('元数据管理</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php
|
||||
if(!empty($this->error))
|
||||
{
|
||||
echo $this->error;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if(!empty($this->metadata))
|
||||
{
|
||||
?>
|
||||
<h2><?= $this->metadata['title'] ?></h2>
|
||||
<?php
|
||||
}
|
||||
if(!empty($this->mailinfo))
|
||||
{
|
||||
?>
|
||||
共统计到可发送的电子邮件地址:<?= $this->mailinfo?>
|
||||
<form id="mailform">
|
||||
<p>
|
||||
<label>邮件标题</label><br />
|
||||
<input type="text" id="title" name="title" class="half" />
|
||||
</p>
|
||||
<p>
|
||||
<label>邮件内容</label><br />
|
||||
<textarea name="body" id="body" class="half large"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="hidden" name="uuid" value="<?= $this->metadata['uuid']?>" />
|
||||
<button type="button" class="btn btn-green" id="send_btn" onclick="sendmail()">发送邮件</button>
|
||||
</p>
|
||||
<p>
|
||||
<iframe id="process" style="border:none;width:500px;height:300px;font-size:12px;" src=""></iframe>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
function sendmail(){
|
||||
if($('#process').attr("src") != "")
|
||||
{
|
||||
Alert("您已经发送过邮件,如果页面没有反应请继续等待服务器响应");return false;
|
||||
}
|
||||
if($("#title").val() == "")
|
||||
{
|
||||
Alert("请填写邮件标题");return false;
|
||||
}
|
||||
if($("#body").val() == "")
|
||||
{
|
||||
Alert("请填写邮件内容");return false;
|
||||
}
|
||||
if($("#body").val().length <= 20 )
|
||||
{
|
||||
Alert("邮件内容过短,请重新填写");return false;
|
||||
}
|
||||
if(confirm("是否确定发送邮件")==false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$('#process').attr("src","/admin/down/sendmail/?ac=send&"+$('#mailform').serialize());
|
||||
}
|
||||
$('#send_btn').ajaxComplete(function() {
|
||||
$('#send_btn').html('发送邮件');
|
||||
});
|
||||
$('#send_btn').ajaxSend(function() {
|
||||
$('#send_btn').html('<img src="/images/ajax-load-small.gif" />正在处理...');
|
||||
});
|
||||
$("#send_btn").ajaxError(function() {
|
||||
$('#send_btn').html('发送邮件');
|
||||
Alert('处理中出现问题,请重试');
|
||||
});
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||
}
|
||||
function isObject(obj){if(typeof(obj)=='object'){return true;}else if(typeof(obj)!='object'){return false;}else{return false;}}
|
||||
</script>
|
|
@ -1,57 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down/">申请管理</a>');
|
||||
$this->breadcrumb('在线下载记录');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/prototype.js');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="rightPanel">
|
||||
<div><a href="/data/<?php echo $this->infos['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a>“<?php echo $this->infos['title']; ?>” 的下载记录</div>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<td width='120'>用户</td>
|
||||
<td width='350'>姓名</td>
|
||||
<td width='150'>下载时间</td>
|
||||
<td width='150'>操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
||||
<td><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['realname'];?></a></td>
|
||||
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
|
||||
<td>
|
||||
<?php if ($item['onlineappid']>0) : ?>
|
||||
<a href='/admin/down/online/show/<?php echo $item['onlineappid'];?>'>详细</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($item['offlineappid']>0) : ?>
|
||||
<a href='/admin/down/offline/show/<?php echo $item['offlineappid'];?>'>详细</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('用户下载记录');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/prototype.js');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="rightPanel">
|
||||
<div style="font-size:16px;line-height:30px;">用户 “<?php echo $this->infos['username']; ?>” 的下载记录</div>
|
||||
<table><thead>
|
||||
<tr>
|
||||
<td width='100'>姓名</td>
|
||||
<td width='350'>数据</td>
|
||||
<td width='150'>下载时间</td>
|
||||
<td width='150'>操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a>(<?php echo $item['filesize'];?>MB)</td>
|
||||
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
|
||||
<td>
|
||||
<?php if($item['onlineappid']>0){echo '<a href="/admin/down/online/show/'.$item['onlineappid'].'">详细</a>';} ?>
|
||||
<?php if ($item['offlineappid']>0) : ?>
|
||||
<a href='/admin/down/offline/show/<?php echo $item['offlineappid'];?>'>详细</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('申请管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
<div class="right_title">离线申请中可能与网站会员关联的账户列表 (<?php echo $this->count;?> 条)</div>
|
||||
|
||||
<table><thead>
|
||||
<tr>
|
||||
<td width='100'>离线申请姓名</td>
|
||||
<td width='150'>离线申请Email</td>
|
||||
<td width='100'>用户姓名</td>
|
||||
<td width='150'>用户Email</td>
|
||||
<td width='100'>用户ID</td>
|
||||
<td width='200'>sql</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><?php echo $item['un'];?></td>
|
||||
<td><?php echo $item['email']; ?></td>
|
||||
<td><?php echo $item['rn'];?></td>
|
||||
<td><?php echo $item['uemail']; ?></td>
|
||||
<td><?php echo $item['uid'];?></td>
|
||||
<td><?php echo $item['sql'];?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,62 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||
$this->breadcrumb('在线下载记录');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/prototype.js');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('down/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
<p><?php echo $this->msg; ?></p>
|
||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||
<p><?php echo $msg; ?></p>
|
||||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</div>
|
||||
|
||||
<div class="search">
|
||||
<form action="/admin/down/user/" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<ul>
|
||||
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table><thead>
|
||||
<tr>
|
||||
<td width='150'>姓名</td>
|
||||
<td width='350'>单位</td>
|
||||
<td width='150'>下载次数</td>
|
||||
<td width='150'>操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||
<td><a href="/admin/user/show/id/<?php echo $item['uid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['uid'];?>"><?= $item['realname']?></a> </td>
|
||||
<td><?php echo $item['unit']; ?></td>
|
||||
<td><?php echo $item['num']; ?></td>
|
||||
<td>
|
||||
<a href='/admin/down/user/show/<?php echo $item['uid'];?>'>详细</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||
<?php if(!empty($this->pageID)) {?>
|
||||
<script>$('#Nav-<?= $this->pageID?>').addClass("active");</script>
|
||||
<?php } ?>
|
|
@ -1,30 +0,0 @@
|
|||
<div class="masthead">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<ul class="nav" id="mainmenu">
|
||||
<!-- CSS Tabs -->
|
||||
<li><a href="/"><span>前台</span></a></li>
|
||||
<li><a href="/admin"><span>后台首页</span></a></li>
|
||||
<li><a href="/admin/data"><span>数据管理</span></a></li>
|
||||
<li><a href="/admin/down"><span>申请管理</span></a></li>
|
||||
<li><a href="/admin/user"><span>用户管理</span></a></li>
|
||||
<li><a href="/admin/review"><span>元数据评审</span></a></li>
|
||||
<li><a href="/admin/news"><span>新闻中心</span></a></li>
|
||||
<li><a href="/admin/stat"><span>统计数据</span></a></li>
|
||||
<li><a href="/admin/sys"><span>系统管理</span></a></li>
|
||||
</ul>
|
||||
<p class="navbar-text pull-right">
|
||||
<?php
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
echo '<a href="/account/edit">'.$user->username.'</a> <a href="/account/logout">注销</a>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.navbar -->
|
||||
</div>
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('黑河数据集');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('heihe/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
<ul>
|
||||
<li class="title">黑河数据集</li>
|
||||
<li><a href="/admin/heihe/project">项目</a></li>
|
||||
</ul>
|
|
@ -1,75 +0,0 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/heihe">黑河数据集</a>');
|
||||
$this->breadcrumb('黑河数据集');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
?>
|
||||
<?php
|
||||
if(!empty($this->error))
|
||||
{
|
||||
echo $this->error;
|
||||
echo "<script>setTimeout('parent.$.fn.colorbox.close();',2000);</script>";
|
||||
}else{?>
|
||||
<div class="content" id="datalist">
|
||||
<ul>
|
||||
<?php
|
||||
foreach($this->experts as $k=>$v)
|
||||
{
|
||||
echo '<li id="item_'.$k.'"><p>'.$v['name'] ." - ".
|
||||
$v['email'].' - '.
|
||||
$v['validation'].' - '.
|
||||
str_replace("\"","",$v['created']) .'
|
||||
<lable id="delBtn_'.$k.'">
|
||||
【<a href="javascript:void(0);" onclick="del(\''.$k.'\')">删除</a>】</lable</p>
|
||||
<p>邀请链接:'.$v['url'].'</p>
|
||||
</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
function del(id){
|
||||
var dom = "#delBtn_"+id;
|
||||
var html = $(dom).html();
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/admin/heihe/project/ac/showexpert',
|
||||
'data':'id=<?= $this->pid;?>&del='+id,
|
||||
'success':function(data){
|
||||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{Alert(data.error);return false;}
|
||||
if(typeof(data.msg)!='undefined')
|
||||
{Alert(data.msg);}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#item_'+id).fadeOut(function(){$(this).remove();});}
|
||||
}
|
||||
else{
|
||||
Alert('出现错误,请稍后再试');
|
||||
}
|
||||
},
|
||||
'timeout': 30000,
|
||||
'error': function(){Alert('处理中出现错误,请刷新页面后重试');},
|
||||
'beforeSend':function(){$(dom).html('<img src="/images/ajax-load-small.gif" />');$(dom).attr("disabled","disabled")},
|
||||
'complete':function(){$(dom).html(html);$(dom).removeAttr("disabled");dom = null;}
|
||||
});
|
||||
}
|
||||
function Alert(html){
|
||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||
}
|
||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue