function comment_js_action() { front::check_type(front::get('aid')); $comment=new comment(); $this->view->comments=$comment->getrows('state=1 and aid='.front::get('aid'),20,'1'); $this->view->aid=front::get('aid'); echo tool::text_javascript($this->fetch()); exit; }
function attachment_js_action() { front::check_type(front::get('aid')); $aid=front::get('aid'); $name=archive_attachment($aid,'intro'); $path=archive_attachment($aid,'path'); $base_url = config::get('base_url'); if(!$name) $name=preg_replace('%(.*)[\\\\\/](.*)_\d+(\.[a-z]+)$%i','$2',$path); if(!rank::arcget($aid,$this->view->usergroupid,'down')) { $link="<a id='att' href='javascript:alert(\"未取得授权,无法下载!\");'><img src='{$base_url}/images/download.gif' alt='$name' /></a>"; echo tool::text_javascript($link); exit; }else { if(config::get('verifycode')) { $link="<a target='_blank' id='att' href='".url::create('attachment/downfile/aid/'.$aid.'/v/ce')."'><img src='{$base_url}/images/download.gif' alt='$name' /></a>"; echo tool::text_javascript($link); exit; }else { $link="<a target='_blank' id='att' href='".url::create('attachment/down/aid/'.$aid)."'><img src='{$base_url}/images/download.gif' alt='$name' /></a>"; echo tool::text_javascript($link); exit; } } }
function view_js_action() { front::check_type(front::get('aid')); $aid = front::get('aid'); $this->archive->rec_update('view=view+1', $aid); $archive = $this->archive->getrow($aid); echo tool::text_javascript($archive['view']); exit; }
function get_action() { front::check_type(front::get('id')); $tagid=front::get('id'); echo tool::text_javascript(templatetag::tag($tagid)); }
function login_js_action() { if(cookie::get('login_username') &&cookie::get('login_password')) { $user=$this->_user->getrow(array('username'=>cookie::get('login_username'))); if(is_array($user) &&cookie::get('login_password')==front::cookie_encode($user['password'])) { $this->view->user=$user; session::set('username',$user['username']); } } echo tool::text_javascript($this->fetch()); exit; }
function view_action() { $this->view->aid=front::get('aid'); echo tool::text_javascript($this->fetch()); }
function ding_action() { echo tool::text_javascript('null'); }