添加bootstrap layout; #449重新制作了在线申请表填写页面;重写账户信息修改和密码修改页面
This commit is contained in:
parent
315ef51f2c
commit
e20517f3c5
|
@ -1,25 +1,208 @@
|
|||
<?php
|
||||
|
||||
class AccountController extends Zend_Controller_Action
|
||||
{
|
||||
function indexAction()
|
||||
{
|
||||
$this->_redirect('/');
|
||||
}
|
||||
function init()
|
||||
{
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
}
|
||||
function postDispatch()
|
||||
{
|
||||
//$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
function preDispatch()
|
||||
{
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->_request->setParam('return', $this->_request->getServer('REQUEST_URI'));
|
||||
//$this->db=Zend_Registry::get('db');
|
||||
$this->db = Zend_Registry::get('db');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
$this->view->theme = new Theme();
|
||||
}
|
||||
|
||||
function indexAction()
|
||||
{
|
||||
$this->_helper->layout->setLayout('layout-bootstrap');
|
||||
$this->view->pageID = "account-index";
|
||||
|
||||
include_once("Users.php");
|
||||
$usr = new Users($this->db);
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$uid = $user->id;
|
||||
}
|
||||
|
||||
include_once("Avatar.php");
|
||||
$avatar = new Avatar();
|
||||
$this->view->avatar = $avatar->Get($user->email,140);
|
||||
|
||||
$this->view->info = $usr->getUserInfo($uid);
|
||||
}
|
||||
|
||||
function editAction()
|
||||
{
|
||||
$this->_helper->layout->setLayout('layout-bootstrap');
|
||||
$this->view->pageID = "account-edit";
|
||||
|
||||
include_once("Users.php");
|
||||
$usr = new Users($this->db);
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$uid = $user->id;
|
||||
}
|
||||
|
||||
include_once("Avatar.php");
|
||||
$avatar = new Avatar();
|
||||
$this->view->avatar = $avatar->Get($user->email,140);
|
||||
|
||||
$this->view->projectType = array(
|
||||
"无" => '',
|
||||
"国家973计划项目课题" => "国家973计划项目课题",
|
||||
"国家863计划课题"=>"国家863计划课题",
|
||||
"国家级科技支撑课题" => "国家级科技支撑课题",
|
||||
"国家级科技重大专项" => "国家级科技重大专项",
|
||||
"国家级国家重大工程" => "国家级国家重大工程",
|
||||
"国家级国家自然科学基金" => "国家级国家自然科学基金",
|
||||
"国际合作项目"=>"国际合作项目",
|
||||
"省部级项目" => "省部级项目",
|
||||
"其他项目工程" => "其他项目工程"
|
||||
);
|
||||
|
||||
$submit = $this->_getParam('submit');
|
||||
|
||||
if(!empty($submit))
|
||||
{
|
||||
$data = $this->AccountEditParamFilter();
|
||||
|
||||
if($this->db->update("users",$data,"id=$uid"))
|
||||
{
|
||||
$this->view->AlertType = "alert-success";
|
||||
$this->view->msg = "修改成功!";
|
||||
$this->view->jump_url = "/account/edit";
|
||||
return true;
|
||||
}else{
|
||||
$this->view->AlertType = "alert-error";
|
||||
$this->view->error = "修改失败,请重试";
|
||||
$this->view->info = $data;
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
$this->view->info = $usr->getUserInfo($uid);
|
||||
}
|
||||
}
|
||||
|
||||
function AccountEditParamFilter(){
|
||||
$data = array();
|
||||
$data['realname'] = substr(trim($this->_getParam('realname')),0,40);
|
||||
$data['unit'] = substr(trim($this->_getParam('unit')),0,100);
|
||||
$data['address'] = substr(trim($this->_getParam('address')),0,100);
|
||||
$data['phone'] = substr(trim($this->_getParam('phone')),0,15);
|
||||
$data['postcode'] = substr(trim($this->_getParam('postcode')),0,15);
|
||||
$data['project_type'] = substr(trim($this->_getParam('project_type')),0,100);
|
||||
$data['project_id'] = substr(trim($this->_getParam('project_id')),0,40);
|
||||
$data['project_title'] = substr(trim($this->_getParam('project_title')),0,100);
|
||||
$data['project'] = substr(trim($this->_getParam('project')),0,600);
|
||||
|
||||
foreach($data as $k=>$v)
|
||||
{
|
||||
$data[$k] = $this->StringFilter($v);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
function StringFilter($string){
|
||||
$string = preg_replace ('/<[^>]*>/', ' ', $string);
|
||||
return $string;
|
||||
}
|
||||
|
||||
function secureAction()
|
||||
{
|
||||
$this->_helper->layout->setLayout('layout-bootstrap');
|
||||
$this->view->pageID = "account-secure";
|
||||
|
||||
include_once("Users.php");
|
||||
$usr = new Users($this->db);
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$uid = $user->id;
|
||||
}
|
||||
|
||||
$submit = $this->_getParam('submit');
|
||||
|
||||
if(!empty($submit))
|
||||
{
|
||||
$data = $this->AccountSecureParamFilter();
|
||||
|
||||
$this->view->AlertType = "alert-error";
|
||||
if(strlen($data['password'])>18 || strlen($data['new_password'])>18)
|
||||
{
|
||||
$this->view->error = "密码过长";
|
||||
return true;
|
||||
}
|
||||
if(strlen($data['new_password'])<=6 || strlen($data['new_password_confrim'])<=6)
|
||||
{
|
||||
$this->view->error = "密码过短,请输入大于6位的密码";
|
||||
return true;
|
||||
}
|
||||
if(md5($data['new_password']) != md5($data['new_password_confrim']))
|
||||
{
|
||||
$this->view->error = "两次输入的密码不相同";
|
||||
return true;
|
||||
}
|
||||
|
||||
$sql = "SELECT password FROM users WHERE id=$uid";
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
|
||||
if(md5($data['password']) != $row['password'])
|
||||
{
|
||||
$this->view->error = "原密码不正确";
|
||||
return true;
|
||||
}
|
||||
|
||||
unset($data['new_password']);
|
||||
unset($data['new_password_confrim']);
|
||||
|
||||
$data['password'] = md5($data['password']);
|
||||
|
||||
if($this->db->update("users",$data,"id=$uid"))
|
||||
{
|
||||
$this->view->AlertType = "alert-success";
|
||||
$this->view->msg = "修改成功!";
|
||||
$this->view->jump_url = "/account/secure";
|
||||
return true;
|
||||
}else{
|
||||
$this->view->AlertType = "alert-error";
|
||||
$this->view->error = "修改失败,请重试";
|
||||
$this->view->info = $data;
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
$this->view->info = $usr->getUserInfo($uid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function AccountSecureParamFilter(){
|
||||
$data = array();
|
||||
$data['password'] = trim($this->_getParam('password'));
|
||||
$data['new_password'] = trim($this->_getParam('new_password'));
|
||||
$data['new_password_confrim'] = trim($this->_getParam('new_password_confrim'));
|
||||
foreach($data as $k=>$v)
|
||||
{
|
||||
$data[$k] = $this->StringFilter($v);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
function init()
|
||||
{
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
}
|
||||
|
||||
function postDispatch()
|
||||
{
|
||||
//$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
|
||||
function registerAction()
|
||||
|
@ -62,51 +245,7 @@ class AccountController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
}
|
||||
function editAction()
|
||||
{
|
||||
$form=new UsereditForm();
|
||||
$this->view->form=$form;
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$user = $auth->getIdentity();
|
||||
if ($this->_request->isPost()) {
|
||||
$formData = $this->_request->getPost();
|
||||
if ($form->isValid($formData)) {
|
||||
//save user info
|
||||
$ut=new UsersTable();
|
||||
$row=$ut->fetchRow('id='.$formData['id']);
|
||||
if (md5($formData['oldpassword'])==$row->password && $formData['password']) {
|
||||
//修改密码
|
||||
$row->password=md5($formData['password']);
|
||||
}
|
||||
if ($formData['email']) $row->email=$formData['email'];
|
||||
if ($formData['phone']) $row->phone=$formData['phone'];
|
||||
if ($formData['realname']) $row->realname=$formData['realname'];
|
||||
if ($formData['unit']) $row->unit=$formData['unit'];
|
||||
if ($formData['address']) $row->address=$formData['address'];
|
||||
if ($formData['project']) $row->project=$formData['project'];
|
||||
$row->save();
|
||||
//todo:更新session信息
|
||||
}
|
||||
} else {
|
||||
/*$formData['id']=$user->id;
|
||||
$formData['email']=$user->email;
|
||||
$formData['phone']=$user->phone;
|
||||
$formData['realname']=$user->realname;
|
||||
$formData['unit']=$user->unit;
|
||||
$formData['address']=$user->address;
|
||||
$formData['project']=$user->project;*/
|
||||
$ut=new UsersTable();
|
||||
$row=$ut->fetchRow('id='.$user->id);
|
||||
$formData['email']=$row->email;
|
||||
$formData['phone']=$row->phone;
|
||||
$formData['realname']=$row->realname;
|
||||
$formData['unit']=$row->unit;
|
||||
$formData['address']=$row->address;
|
||||
$formData['project']=$row->project;
|
||||
$formData['id']=$row->id;
|
||||
$form->populate($formData);
|
||||
}
|
||||
}
|
||||
|
||||
function loginAction()
|
||||
{
|
||||
$form = new LoginForm();
|
||||
|
|
|
@ -939,48 +939,6 @@ class DataController extends Zend_Controller_Action
|
|||
}//else echo "<li>No comments.</li>";
|
||||
}//评论列表
|
||||
|
||||
function creatform($datas) {
|
||||
return '
|
||||
<div class="downloadtip">温馨提示:您需要填写以下信息才可以下载该数据</div>
|
||||
<form id="todownloadform" name="todownloadform" action="/data/todownload/">
|
||||
<table>
|
||||
<tr><td class="first">真实姓名</td><td><input type="text" name="username" value="'.$datas['username'].'" /></td></tr>
|
||||
<tr><td class="first">单位名称</td><td><input type="text" name="unit" value="'.$datas['unit'].'"/></td></tr>
|
||||
<tr><td class="first">联系电话</td><td><input type="text" name="phone" value="'.$datas['phone'].'"/></td></tr>
|
||||
<tr><td class="first">联系地址</td><td><input type="text" name="address" value="'.$datas['address'].'"/></td></tr>
|
||||
<tr><td class="first">邮政编码</td><td><input type="text" name="postcode" value="'.$datas['postcode'].'"/></td></tr>
|
||||
<tr><td class="first">电子邮箱</td><td><input type="text" name="email" value="'.$datas['email'].'"/></td></tr>
|
||||
<tr><td class="first">项目编号</td><td><input type="text" name="projectid" value="'.$datas['project_id'].'"/></td></tr>
|
||||
<tr><td class="first">项目名称</td><td><input type="text" name="projecttitle" value="'.$datas['project_title'].'"/></td></tr>
|
||||
<tr><td class="first">项目类型</td><td><select name="projecttype">
|
||||
<option value="0" '.($datas['project_type']==''?'selected="selected"':'').'>无</option>
|
||||
<option value="国家973计划项目课题" '.($datas['project_type']=='国家973计划项目课题'?'selected="selected"':'').'>国家973计划项目课题</option>
|
||||
<option value="国家863计划课题" '.($datas['project_type']=='国家863计划课题'?'selected="selected"':'').'>国家863计划课题</option>
|
||||
<option value="国家级科技支撑课题" '.($datas['project_type']=='国家级科技支撑课题'?'selected="selected"':'').'>国家级科技支撑课题</option>
|
||||
<option value="国家级科技重大专项" '.($datas['project_type']=='国家级科技重大专项'?'selected="selected"':'').'>国家级科技重大专项</option>
|
||||
<option value="国家级国家重大工程" '.($datas['project_type']=='国家级国家重大工程'?'selected="selected"':'').'>国家级国家重大工程</option>
|
||||
<option value="国家级国家自然科学基金" '.($datas['project_type']=='国家级国家自然科学基金'?'selected="selected"':'').'>国家级国家自然科学基金</option>
|
||||
<option value="国际合作项目" '.($datas['project_type']=='国际合作项目'?'selected="selected"':'').'>国际合作项目</option>
|
||||
<option value="省部级项目" '.($datas['project_type']=='省部级项目'?'selected="selected"':'').'>省部级项目</option>
|
||||
<option value="其他项目工程" '.($datas['project_type']=='其他项目工程'?'selected="selected"':'').'>其他项目工程</option>
|
||||
</select></td></tr>
|
||||
<tr><td class="first">项目说明</td><td><textarea name="project" class="half">'.$datas['project'].'</textarea></td></tr>
|
||||
</table>
|
||||
请您填写完整的数据用途信息,包括项目类型、编号、题目、负责人等信息;若仅用于论文写作,请告知研究题目或主要内容,并注明导师姓名;其他用途如实注明即可。清晰明确的数据用途有助于我们更快得审核和通过申请,也会使您更快获得数据!<br />
|
||||
例一:<br />
|
||||
项目类型:973<br />
|
||||
项目名称:飞行终端区复杂场景建模的理论与方法子课题:基于多源遥感影像的目标和场景三维重建研究<br />
|
||||
项目编号:2010CB731801<br />
|
||||
项目负责人:邵振峰<br />
|
||||
使用目的:用于模拟基于多源遥感影像的目标和场景<br />
|
||||
<br />
|
||||
例二:<br />
|
||||
硕士毕业论文:《全波形激光雷达数据处理研究》,导师:李传荣研究员。<br />
|
||||
<input type="button" value="提交" onclick="todownload(0)" class="btn" />
|
||||
<input type="hidden" name="submited" value="1" />
|
||||
</form>';
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断用户是否填写了申请信息
|
||||
* @param string $uuid
|
||||
|
@ -988,29 +946,168 @@ class DataController extends Zend_Controller_Action
|
|||
*/
|
||||
function todownloadAction() {
|
||||
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$this->_helper->layout->setLayout('layout-bootstrap');
|
||||
$this->view->pageID = "account-dataorder";
|
||||
|
||||
$uuid = $this->_request->getParam('uuid');
|
||||
$ft = $this->_request->getParam('ft');
|
||||
$this->_helper->viewRenderer('onlineapp-download');
|
||||
|
||||
if (empty($uuid))
|
||||
{
|
||||
echo "请按正确的下载步骤进行下载<br />
|
||||
如果页面没有自动跳转,<a href='/data'>请点击这里</a>
|
||||
<script>self.location='/data'</script>";
|
||||
exit();
|
||||
}
|
||||
$this->view->uuid = $uuid = $this->_request->getParam('uuid');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if (!$auth->hasIdentity())
|
||||
{
|
||||
echo "您需要登录才能下载<br />
|
||||
如果页面没有自动跳转,<a href='/account/login'>请点击这里进入登录页面</a>
|
||||
<script>self.location='/account/login/?href='+location.href</script>";
|
||||
exit();
|
||||
$this->view->AlertType = "alert-error";
|
||||
$this->view->msg = "请先登录您的账户后进行下载,页面将自动跳转";
|
||||
$this->view->jump_url = '/account/login/?href=/data/todownload/uuid/'.$uuid;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(empty($uuid))
|
||||
{
|
||||
$this->view->AlertType = "alert-error";
|
||||
$this->view->msg = "参数错误!";
|
||||
$this->view->jump_url = "/data";
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->view->projectType = array(
|
||||
"无" => '',
|
||||
"国家973计划项目课题" => "国家973计划项目课题",
|
||||
"国家863计划课题"=>"国家863计划课题",
|
||||
"国家级科技支撑课题" => "国家级科技支撑课题",
|
||||
"国家级科技重大专项" => "国家级科技重大专项",
|
||||
"国家级国家重大工程" => "国家级国家重大工程",
|
||||
"国家级国家自然科学基金" => "国家级国家自然科学基金",
|
||||
"国际合作项目"=>"国际合作项目",
|
||||
"省部级项目" => "省部级项目",
|
||||
"其他项目工程" => "其他项目工程"
|
||||
);
|
||||
|
||||
$userid = Zend_Auth::getInstance()->getIdentity()->id;
|
||||
|
||||
$submit = $this->_getParam('submit');
|
||||
if(!empty($submit)){
|
||||
|
||||
$datas = array();
|
||||
$datas['realname'] = $this->_request->getParam('realname');
|
||||
$datas['unit'] = $this->_request->getParam('unit');
|
||||
$datas['phone'] = $this->_request->getParam('phone');
|
||||
$datas['address'] = $this->_request->getParam('address');
|
||||
$datas['postcode'] = $this->_request->getParam('postcode');
|
||||
$datas['email'] = $this->_request->getParam('email');
|
||||
$datas['project'] = $this->_request->getParam('project');
|
||||
$datas['project_id'] = $this->_request->getParam('project_id');
|
||||
$datas['project_type'] = $this->_request->getParam('project_type');
|
||||
$datas['project_title'] = $this->_request->getParam('project_title');
|
||||
|
||||
$this->view->info = $datas;
|
||||
|
||||
$this->view->AlertType = "alert-error";
|
||||
|
||||
foreach($datas as $k=>$v)
|
||||
{
|
||||
if(empty($v))
|
||||
{
|
||||
$this->view->error = "每一项内容都需要填写";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!is_numeric($datas['postcode']))
|
||||
{
|
||||
$this->view->error = "联系电话和邮政编码请填写数字";
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i",$datas['email']))
|
||||
{
|
||||
$this->view->error = "请填写正确的email地址";
|
||||
return true;
|
||||
}
|
||||
|
||||
if(mb_strlen($datas['project'],"utf-8")<8)
|
||||
{
|
||||
$this->view->error = "项目介绍内容不少于8个字符";
|
||||
return true;
|
||||
}
|
||||
|
||||
if(preg_match('/^\d+$/',$datas['project']))
|
||||
{
|
||||
$this->view->error = "请输入有意义的项目介绍内容";
|
||||
return true;
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'userid' => $userid,
|
||||
'username' => $datas['realname'],
|
||||
'unit' => $datas['unit'],
|
||||
'phone' => $datas['phone'],
|
||||
'address' => $datas['address'],
|
||||
'postcode' => $datas['postcode'],
|
||||
'project' => $datas['project'],
|
||||
'uuid' =>$uuid,
|
||||
'email' =>$datas['email'],
|
||||
'project_id'=>$datas['project_id'],
|
||||
'project_title'=>$datas['project_title'],
|
||||
'project_type'=>$datas['project_type']
|
||||
);
|
||||
|
||||
if($this->db->insert('onlineapp',$data))
|
||||
{
|
||||
$select = "select id from onlineapp where userid='$userid' order by id desc";
|
||||
$re=$this->db->query($select);
|
||||
$row=$re->fetch();
|
||||
|
||||
$this->view->AlertType = "alert-success";
|
||||
$this->view->jump_url = '/data/download/uuid/'.$uuid.'/onlineappid/'.$row['id'];
|
||||
$this->view->msg = "您的信息已经提交成功,可以进行下载。请等待页面自动跳转,<a href=\"".$this->view->jump_url."\">或点击这里进入下载页面</a>";
|
||||
|
||||
$msg = "用户{$data['username']} 填写了在线数据申请表 <a href=\"/admin/down/online/show/{$row['id']}\">查看详细</a>";
|
||||
$title = "用户 {$data['username']} 申请了在线下载数据";
|
||||
include_once("message.php");
|
||||
message::post($this->db,0,-1,$title,$msg);
|
||||
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
$this->view->AlertType = "alert-error";
|
||||
$this->view->error = "申请失败,请稍后重新尝试";
|
||||
$this->view->info = $data;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}else{
|
||||
|
||||
$testsql="select * from onlineapp where userid='$userid' and uuid='$uuid' order by id desc";
|
||||
$result=$this->db->query($testsql);
|
||||
$rows = $result->fetch();
|
||||
if (empty($rows['id']))
|
||||
{
|
||||
include_once("Users.php");
|
||||
$usr = new Users($this->db);
|
||||
$this->view->info = $usr->getUserInfo($userid);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$datas['realname'] = $rows['username'];
|
||||
$datas['unit'] = $rows['unit'];
|
||||
$datas['phone'] = $rows['phone'];
|
||||
$datas['address'] = $rows['address'];
|
||||
$datas['postcode'] = $rows['postcode'];
|
||||
$datas['email'] = $rows['email'];
|
||||
$datas['project'] = $rows['project'];
|
||||
$datas['project_id'] = $rows['project_id'];
|
||||
$datas['project_type'] = $rows['project_type'];
|
||||
$datas['project_title'] = $rows['project_title'];
|
||||
$this->view->info = $datas;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
$userid=Zend_Auth::getInstance()->getIdentity()->id;
|
||||
|
||||
$datas = array();
|
||||
|
|
|
@ -1,13 +1,132 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('修改用户信息');
|
||||
$this->headTitle('我的账户');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/register.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/account/edit">修改用户信息</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'jquery');
|
||||
$this->theme->AppendPlus($this,'bootstarp');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div id="info">
|
||||
|
||||
|
||||
<?php echo $this->form;?></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<?= $this->partial('account/left.phtml'); ?>
|
||||
</div><!--/.well -->
|
||||
</div><!--/span-->
|
||||
<div class="span9">
|
||||
<h3>修改账户信息</h3>
|
||||
<hr />
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?php if(!empty($this->jump_url)) {?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<br /><a href="<?= $this->jump_url ?>">如果页面没有自动跳转请点击这里</a>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php }else{?>
|
||||
<?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 } ?>
|
||||
<form action="/account/edit" method="post" class="form-horizontal">
|
||||
<div class="control-group ">
|
||||
<label class="control-label">头像</label>
|
||||
<div class="controls">
|
||||
<img src="<?= $this->avatar ?>" class="img-polaroid">
|
||||
<span class="help-inline">您的头像信息使用<a href="https://cn.gravatar.com/">Gravatar</a>头像信息<br />请使用西部数据中心注册的Email账号在<a href="https://cn.gravatar.com/">Gravatar</a>网站设置头像<br />设置好头像后重新登录网站即可更新头像</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">真实姓名</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="realname" value="<?php echo empty($this->info['realname']) ? "":$this->info['realname']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">工作单位</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="unit" value="<?php echo empty($this->info['unit']) ? "":$this->info['unit']; ?>" class="span8" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">联系地址</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="address" value="<?php echo empty($this->info['address']) ? "":$this->info['address']; ?>" class="span8" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">联系电话</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="phone" value="<?php echo empty($this->info['phone']) ? "":$this->info['phone']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">邮编</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="postcode" value="<?php echo empty($this->info['postcode']) ? "":$this->info['postcode']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目类型</label>
|
||||
<div class="controls">
|
||||
<select id="project_type" name="project_type">
|
||||
<?php if(!empty($this->projectType)) { ?>
|
||||
<?php foreach($this->projectType as $k=>$v) { ?>
|
||||
<?php if(empty($this->info['project_type'])) {?>
|
||||
<?php if($v == "") { ?>
|
||||
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
|
||||
<?php }else { ?>
|
||||
<option value="<?= $v ?>"><?= $k ?></option>
|
||||
<?php }
|
||||
} else {?>
|
||||
<?php if($v == $this->info['project_type']) { ?>
|
||||
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
|
||||
<?php }else { ?>
|
||||
<option value="<?= $v ?>"><?= $k ?></option>
|
||||
<?php }
|
||||
}?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目编号</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="project_id" value="<?php echo empty($this->info['project_id']) ? "":$this->info['project_id']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="project_title" value="<?php echo empty($this->info['project_title']) ? "":$this->info['project_title']; ?>" class="span8" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目简介</label>
|
||||
<div class="controls">
|
||||
<textarea name="project" class="span8"><?php echo empty($this->info['project']) ? "":$this->info['project']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="submit" value="submit" />
|
||||
<button type="submit" class="btn btn-primary">确定</button>
|
||||
<button type="button" class="btn">取消</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php }?>
|
||||
</div><!--/span-->
|
||||
</div><!--/row-->
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('我的账户');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->theme->AppendPlus($this,'jquery');
|
||||
$this->theme->AppendPlus($this,'bootstarp');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<?= $this->partial('account/left.phtml'); ?>
|
||||
</div><!--/.well -->
|
||||
</div><!--/span-->
|
||||
<div class="span9">
|
||||
<h3>账户信息</h3>
|
||||
<hr />
|
||||
<?php if(!empty($this->info)) {?>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>头像</dt>
|
||||
<dd><img src="<?= $this->avatar ?>" class="img-polaroid"></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>用户名</dt>
|
||||
<dd><?php echo $this->info['username'] ?></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Email</dt>
|
||||
<dd><?php echo $this->info['email'] ?></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>真实姓名</dt>
|
||||
<dd><?php echo $this->info['realname'] ?></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>工作单位</dt>
|
||||
<dd><?php echo $this->info['unit'] ?></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>项目</dt>
|
||||
<dd><?php echo $this->info['project_title'] ?></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>账号注册时间</dt>
|
||||
<dd><?php echo date("Y-m-d H:i",strtotime($this->info['ts_created'])) ?></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>上次登录时间</dt>
|
||||
<dd><?php echo date("Y-m-d H:i",strtotime($this->info['ts_last_login'])) ?></dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
</div><!--/span-->
|
||||
</div><!--/row-->
|
||||
</div>
|
|
@ -0,0 +1,10 @@
|
|||
<ul class="nav nav-list">
|
||||
<li class="nav-header">应用</li>
|
||||
<li id="Nav-account-dataorder"><a href="/data/order">数据篮</a></li>
|
||||
<!-- <li id="Nav-account-myfav"><a href="/account/myfav">我的收藏</a></li> -->
|
||||
<li class="nav-header">账户</li>
|
||||
<li id="Nav-account-index"><a href="/account">账户信息</a></li>
|
||||
<li id="Nav-account-secure"><a href="/account/secure">安全性</a></li>
|
||||
<li id="Nav-account-edit"><a href="/account/edit">设置</a></li>
|
||||
<!-- <li><a href="/account/linkin">关联账号</a></li> -->
|
||||
</ul>
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('我的账户');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->theme->AppendPlus($this,'jquery');
|
||||
$this->theme->AppendPlus($this,'bootstarp');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<?= $this->partial('account/left.phtml'); ?>
|
||||
</div><!--/.well -->
|
||||
</div><!--/span-->
|
||||
<div class="span9">
|
||||
<h3>修改安全性设置</h3>
|
||||
<hr />
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?php if(!empty($this->jump_url)) {?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<br /><a href="<?= $this->jump_url ?>">如果页面没有自动跳转请点击这里</a>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php }else{?>
|
||||
<?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 } ?>
|
||||
<form action="/account/secure" method="post" class="form-horizontal">
|
||||
<div class="control-group ">
|
||||
<label class="control-label">当前密码</label>
|
||||
<div class="controls">
|
||||
<input name="password" type="password" value="" />
|
||||
<span class="help-inline">如果要修改密码,请输入原密码</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">新密码</label>
|
||||
<div class="controls">
|
||||
<input type="password" name="new_password" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">确认新密码</label>
|
||||
<div class="controls">
|
||||
<input type="password" name="new_password_confrim" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="submit" value="submit" />
|
||||
<button type="submit" class="btn btn-primary">确定</button>
|
||||
<button type="button" class="btn">取消</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php }?>
|
||||
</div><!--/span-->
|
||||
</div><!--/row-->
|
||||
</div>
|
|
@ -0,0 +1,149 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('我的账户');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->theme->AppendPlus($this,'jquery');
|
||||
$this->theme->AppendPlus($this,'bootstarp');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<?= $this->partial('account/left.phtml'); ?>
|
||||
</div><!--/.well -->
|
||||
</div><!--/span-->
|
||||
<div class="span9">
|
||||
<h3>在线数据下载申请</h3>
|
||||
<hr />
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<?php if(!empty($this->jump_url)) {?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<br /><a href="<?= $this->jump_url ?>">如果页面没有自动跳转请点击这里</a>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php }else{?>
|
||||
<?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 } ?>
|
||||
<form action="/data/todownload/" method="post" class="form-horizontal">
|
||||
<div class="control-group ">
|
||||
<label class="control-label">真实姓名</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="realname" value="<?php echo empty($this->info['realname']) ? "":$this->info['realname']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">工作单位</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="unit" value="<?php echo empty($this->info['unit']) ? "":$this->info['unit']; ?>" class="span8" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">联系地址</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="address" value="<?php echo empty($this->info['address']) ? "":$this->info['address']; ?>" class="span8" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">联系电话</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="phone" value="<?php echo empty($this->info['phone']) ? "":$this->info['phone']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">邮编</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="postcode" value="<?php echo empty($this->info['postcode']) ? "":$this->info['postcode']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">电子邮箱</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="email" value="<?php echo empty($this->info['email']) ? "":$this->info['email']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目类型</label>
|
||||
<div class="controls">
|
||||
<select id="project_type" name="project_type">
|
||||
<?php if(!empty($this->projectType)) { ?>
|
||||
<?php foreach($this->projectType as $k=>$v) { ?>
|
||||
<?php if(empty($this->info['project_type'])) {?>
|
||||
<?php if($v == "") { ?>
|
||||
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
|
||||
<?php }else { ?>
|
||||
<option value="<?= $v ?>"><?= $k ?></option>
|
||||
<?php }
|
||||
} else {?>
|
||||
<?php if($v == $this->info['project_type']) { ?>
|
||||
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
|
||||
<?php }else { ?>
|
||||
<option value="<?= $v ?>"><?= $k ?></option>
|
||||
<?php }
|
||||
}?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目编号</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="project_id" value="<?php echo empty($this->info['project_id']) ? "":$this->info['project_id']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="project_title" value="<?php echo empty($this->info['project_title']) ? "":$this->info['project_title']; ?>" class="span8" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">项目简介</label>
|
||||
<div class="controls">
|
||||
<textarea name="project" class="span8"><?php echo empty($this->info['project']) ? "":$this->info['project']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group ">
|
||||
<label class="control-label">填写说明</label>
|
||||
<div class="controls">
|
||||
请您填写完整的数据用途信息,包括项目类型、编号、题目、负责人等信息;若仅用于论文写作,请告知研究题目或主要内容,并注明导师姓名;其他用途如实注明即可。清晰明确的数据用途有助于我们更快得审核和通过申请,也会使您更快获得数据!
|
||||
<br />
|
||||
<br />
|
||||
例一:<br />
|
||||
项目类型:973<br />
|
||||
项目名称:飞行终端区复杂场景建模的理论与方法子课题:基于多源遥感影像的目标和场景三维重建研究<br />
|
||||
项目编号:2010CB731801<br />
|
||||
项目负责人:邵振峰<br />
|
||||
使用目的:用于模拟基于多源遥感影像的目标和场景<br />
|
||||
<br />
|
||||
例二:<br />
|
||||
硕士毕业论文:《全波形激光雷达数据处理研究》,导师:李传荣研究员。<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="uuid" value="<?= $this->uuid ?>" />
|
||||
<input type="hidden" name="submit" value="submit" />
|
||||
<button type="submit" class="btn btn-primary">确定</button>
|
||||
<a class="btn" href="/data/<?= $this->uuid ?>">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
<?php }?>
|
||||
</div><!--/span-->
|
||||
</div><!--/row-->
|
||||
</div>
|
|
@ -104,7 +104,7 @@ else
|
|||
<?php if ($md->status>0 and $md->status<5) : ?>
|
||||
<a href="/review/review/uuid/<?php echo $md->uuid; ?>"><img src="/images/review.png" title="此数据正在评审中,我们邀请您对此数据进行评审,以便其能尽快发布!" /></a>
|
||||
<?php else : if (!$md->datatype) : ?>
|
||||
<a href="javascript:todownload(1);"><img src="/images/download.png" title="直接下载" /></a>
|
||||
<a href="/data/todownload/?uuid=<?= $md->uuid?>"><img src="/images/download.png" title="直接下载" /></a>
|
||||
<?php else: ?>
|
||||
<a href="/data/order/uuid/<?php echo $md->uuid; ?>"><img src="/images/order.png" title="免费!离线申请此数据(在线数据和离线数据都可申请)"/></a>
|
||||
<?php endif;endif; ?>
|
||||
|
@ -372,25 +372,6 @@ if($auth->hasIdentity())
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function(){$(".colorbox").colorbox({photo:"true"});});
|
||||
|
||||
//ajax download
|
||||
function todownload(ft)
|
||||
{
|
||||
if(ft!=0){$.colorbox({width:"80%",height:"80%",html:$('#todownload').html()});}
|
||||
var url = "/data/todownload/uuid/<?php echo $md->uuid;?>/ft/"+ft;
|
||||
if($('#todownloadform')) var date = $('#todownloadform').serialize();
|
||||
$.ajax({
|
||||
type:"GET",
|
||||
url:url,
|
||||
data:date,
|
||||
success:function(html){
|
||||
$('#formcontent').html(html);
|
||||
},
|
||||
beforeSend:function(){
|
||||
$('#formcontent').html('<img src="/images/11887177066.gif" />');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//ajax comment
|
||||
function ajaxpage(page){$.ajax({type:"GET",url:"/data/comment/uuid/<?= $md->uuid; ?>",data:'page='+page,success:function(html){$('#allcomments').html(html);},
|
||||
beforeSend:function(){$('#allcomments').html('<img src="/images/loading.gif" />加载中');}});};ajaxpage(0);
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<hr>
|
||||
<footer>
|
||||
<p style="text-align:center;font-size:12px;">© 中国西部环境与生态科学数据中心 2006-2013 | <a href="/about/contact" >联系我们</a> | <a href="/about/terms">使用条款和免责申明</a>
|
||||
| <a href="http://www.miibeian.gov.cn" target="_blank">陇ICP备05000491号</a></p>
|
||||
</footer>
|
||||
<?php if(!empty($this->pageID)) {?>
|
||||
<script>$('#Nav-<?= $this->pageID?>').addClass("active");</script>
|
||||
<?php } ?>
|
||||
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
_uacct = "UA-302912-6";
|
||||
urchinTracker();
|
||||
</script>
|
|
@ -0,0 +1,42 @@
|
|||
<div class="row">
|
||||
<a href="/"><img src="/images/westdc-banner.jpg" alt="Westdc Logo" /></a>
|
||||
</div>
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<button data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar" type="button">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
<div class="nav-collapse collapse">
|
||||
<p class="navbar-text pull-right">
|
||||
<?php
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
echo '<a href="/account">'.$user->username.'</a> ';
|
||||
if ($user->usertype=="administrator") echo '<a href="/admin">后台管理</a> ';
|
||||
echo '<a href="/data/order">数据篮</a> <a href="/account/logout">注销</a>';
|
||||
} else {
|
||||
echo '<a href="/account/login">登录</a> <a href="/account/register">注册</a>';
|
||||
} ?>
|
||||
</p>
|
||||
|
||||
<ul class="nav">
|
||||
<!-- CSS Tabs -->
|
||||
<li><a href="/"><span>首页</span></a></li>
|
||||
<li><a href="/data"><span>数据产品与服务</span></a></li>
|
||||
<li><a href="/review"><span>数据评审</span></a></li>
|
||||
<li><a href="/author"><span>数据作者</span></a></li>
|
||||
<li><a href="/knowledge"><span>知识积累</span></a></li>
|
||||
<!-- <li><a href="/community"><span>合作与交流</span></a></li> -->
|
||||
<li><a href="/archives"><span>新闻动态</span></a></li>
|
||||
<li><a href="/about">关于本站</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -22,7 +22,7 @@
|
|||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
echo '<a href="/account/edit">'.$user->username.'</a> ';
|
||||
echo '<a href="/account">'.$user->username.'</a> ';
|
||||
if ($user->usertype=="administrator") echo '<a href="/admin">后台管理</a> ';
|
||||
echo '<a href="/data/order">数据篮</a> <a href="/account/logout">注销</a>';
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?= $this->headTitle() ?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<?= $this->headScript() ?>
|
||||
<?= $this->headLink() ?>
|
||||
<?= $this->headStyle() ?>
|
||||
<link rel="shortcut icon" href="/favicon_64.png" />
|
||||
<link rel="alternate" type="application/rss+xml" title="WestDC RSS Feed" href="/data/feed" />
|
||||
<link rel="pingback" href="http://westdc.westgis.ac.cn/data/pingback" />
|
||||
</head>
|
||||
<body>
|
||||
<?= $this->render('header-bootstrap.phtml') ?>
|
||||
<?= $this->layout()->content ?>
|
||||
<?= $this->render('footer-bootstrap.phtml') ?>
|
||||
</body>
|
||||
<script type="text/javascript">setPage();</script>
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.westgis.ac.cn/" : "http://piwik.westgis.ac.cn/");
|
||||
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script><script type="text/javascript">
|
||||
try {
|
||||
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 5);
|
||||
piwikTracker.trackPageView();
|
||||
piwikTracker.enableLinkTracking();
|
||||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://piwik.westgis.ac.cn/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript>
|
||||
</html>
|
|
@ -40,6 +40,17 @@ class Theme
|
|||
)
|
||||
),
|
||||
|
||||
/********* Bootstarp ******/
|
||||
'bootstarp'=>array(
|
||||
$this->ScriptKey => array(
|
||||
'/js/lib/bootstrap/js/bootstrap.min.js',
|
||||
),
|
||||
$this->CSSKey =>array(
|
||||
'/js/lib/bootstrap/css/bootstrap.min.css',
|
||||
'/js/lib/bootstrap/css/bootstrap-responsive.min.css'
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
/********Jquery 插件********/
|
||||
|
||||
|
|
|
@ -452,4 +452,13 @@ class Users extends Zend_Controller_Plugin_Abstract
|
|||
}
|
||||
}
|
||||
|
||||
//获得某个用户的所有信息
|
||||
public function getUserInfo($id)
|
||||
{
|
||||
$sql = "SELECT * FROM ".$this->tbl_user. " WHERE id=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
return $row;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue