当前位置: 首页>>代码示例>>PHP>>正文


PHP AjaxHead函数代码示例

本文整理汇总了PHP中AjaxHead函数的典型用法代码示例。如果您正苦于以下问题:PHP AjaxHead函数的具体用法?PHP AjaxHead怎么用?PHP AjaxHead使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了AjaxHead函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: syncLog

 function syncLog()
 {
     AjaxHead();
     header('Content-Type: application/json; charset=UTF-8');
     $duoshuoPlugin = Duoshuo_Dedecms::getInstance();
     $response = $duoshuoPlugin->syncLog();
     echo json_encode($response);
     exit;
 }
开发者ID:CMS-CHINA,项目名称:duoshuo-plugins-dedecms,代码行数:9,代码来源:Admin.php

示例2: require_once

<?php
@ob_start();
@set_time_limit(3600);
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_description');
$tjnum = 0;
if($action=='getfields')
{
	AjaxHead();
	$dsql = new DedeSql(false);
	if(!$dsql->linkID){
		echo "<font color='red'>连接数据源的数据库失败!</font><br>";
		echo $qbutton;
		exit();
	}
	$channel = $dsql->getone("select addtable from #@__channeltype where ID=$channel");
	$channel = str_replace('#@__',$cfg_dbprefix,$channel['addtable']);
	$dsql->GetTableFields($channel);
	echo "<div style='border:1px solid #ababab;background-color:#FEFFF0;margin-top:6px;padding:3px;line-height:160%'>";
	echo "表(".$channel.")含有的字段:<br>";
	while($row = $dsql->GetFieldObject()){
		echo "<a href=\"javascript:pf('{$row->name}')\"><u>".$row->name."</u></a>\r\n";
	}
	echo "<input type='hidden' name='addtable' value='$channel' />";
	echo "</div>";
	$dsql->Close();
	exit();
}elseif($action == 'fetch')
{
	
	header("Content-Type: text/html; charset={$cfg_ver_lang}");
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:description_fetch_action.php

示例3: ac_rate

 function ac_rate()
 {
     $type = request('type', '');
     $rate = request('rate', '');
     $askaid = request('askaid', '');
     $askaid = is_numeric($askaid) ? $askaid : 0;
     $type = strip_tags($type);
     $rate = strip_tags($rate);
     if ($type == 'bad') {
         $rate = 'badrate';
     } else {
         $rate = 'goodrate';
     }
     $cookiename = 'rated' . $askaid;
     if (!isset($_COOKIE[$cookiename])) {
         $_COOKIE[$cookiename] = 0;
     }
     if (!$_COOKIE[$cookiename] == $askaid) {
         $this->answer->update_answer("{$rate}={$rate}+1", "id='{$askaid}'");
         makecookie($cookiename, $askaid, 3600);
     }
     $row = $this->answer->get_one("id='{$askaid}'", "goodrate, badrate");
     $goodrate = $row['goodrate'];
     $badrate = $row['badrate'];
     if ($goodrate + $badrate > 0) {
         $goodrateper = ceil($goodrate * 100 / ($badrate + $goodrate));
         $badrateper = 100 - $goodrateper;
     } else {
         $goodrateper = $badrateper = 0;
     }
     $total = $goodrate + $badrate;
     $aid = $askaid;
     AjaxHead();
     $poststr = "<dl>\r\n\t\t\t\t\t<dt><strong>您觉得最佳答案好不好? </strong></dt>\r\n\t\t\t\t\t<dd> <a href=\"#\"  onclick=\"rate('mark',{$askaid},'good')\"><img src=\"static/images/mark_g.gif\" width=\"14\" height=\"16\" />好</a> <span>{$goodrateper}% ({$goodrate})</span> </dd>\r\n                    <dd> <a href=\"#\"  onclick=\"rate('mark',{$askaid},'bad')\"><img src=\"static/images/mark_b.gif\" width=\"14\" height=\"16\" />不好</a> <span>{$badrateper}% ({$badrate})</span></dd>\r\n                    <dt>(目前有 {$total} 个人评价)</dt>\r\n\t\t\t\t   </dl>";
     echo $poststr;
 }
开发者ID:healthguo,项目名称:PHP,代码行数:36,代码来源:question.php

示例4: ac_gettask

 /**
  * caijixia for dedecms
  * @version        $Id: cjx.class.php 112 2013-05-28 01:22:57Z qinjinpeng $
  * @copyright Copyright (c) 2011,caijixia for dedecms,caijixia.com.
  * @license   This is NOT a freeware, use is subject to license terms
  *
  * @param     NULL
  * @return    NULL
 */
 function ac_gettask()
 {
     AjaxHead();
     $typeid = $this->gv('typeid');
     $rs = cjxdb('kwkeyword')->where("typeid={$typeid}")->Fields('`type`,`keyword`')->select();
     $keyword = $rss = $dx = $dxs = '';
     require_once DEDEINC . "/dedetag.class.php";
     $dtp = new DedeTagParse();
     foreach ($rs as $r) {
         if ($r['type'] == 0) {
             $keyword .= empty($keyword) ? $r['keyword'] : "\r\n" . $r['keyword'];
         } else {
             if ($r['type'] == 1) {
                 $rss .= empty($rss) ? $r['keyword'] : "\r\n" . $r['keyword'];
             } else {
                 if ($r['type'] == 2) {
                     $dx .= empty($dx) ? $r['keyword'] : "``" . $r['keyword'];
                     $dtp->LoadString($r['keyword']);
                     $dxt = $dtp->GetTagByName('list') ? $dtp->GetTagByName('list')->GetInnerText() : '';
                     $dxs .= "<span><a href='javascript:void(0);' style='float:right' onclick='delpage(this);'>删除</a><a href='javascript:void(0);' style='float:right' onclick='editpage(this);'>编辑&nbsp;</a>" . $dxt . "</span>";
                 } else {
                 }
             }
         }
     }
     $note = cjxdb('co_note')->Fields('nid,notename')->where('channelid=1')->select();
     foreach ($note as $k => $v) {
         $ck = cjxdb('kwkeyword')->where("`keyword`={$v['nid']} AND `type`=3")->find();
         if ($ck) {
             if ($ck['typeid'] == $typeid) {
                 $note[$k]['btype'] = true;
             } else {
                 $note[$k]['btype'] = $ck['typeid'];
             }
         }
         $note[$k]['channelname'] = '普通文章';
     }
     $this->assign('typeid', $typeid);
     $this->assign('keyword', $keyword);
     $this->assign('rss', $rss);
     $this->assign('dx', $dx);
     $this->assign('dxs', $dxs);
     $this->assign('notelist', $note);
     $this->display();
 }
开发者ID:soonfine,项目名称:leread,代码行数:54,代码来源:cjx.class.php


注:本文中的AjaxHead函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。