本文整理汇总了PHP中tool::text_javascript方法的典型用法代码示例。如果您正苦于以下问题:PHP tool::text_javascript方法的具体用法?PHP tool::text_javascript怎么用?PHP tool::text_javascript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tool
的用法示例。
在下文中一共展示了tool::text_javascript方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: comment_js_action
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;
}
示例2: attachment_js_action
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;
}
}
}
示例3: view_js_action
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;
}
示例4: get_action
function get_action() {
front::check_type(front::get('id'));
$tagid=front::get('id');
echo tool::text_javascript(templatetag::tag($tagid));
}
示例5: login_js_action
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;
}
示例6: view_action
function view_action() {
$this->view->aid=front::get('aid');
echo tool::text_javascript($this->fetch());
}
示例7: ding_action
function ding_action() {
echo tool::text_javascript('null');
}