本文整理匯總了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;
}
示例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}");
示例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;
}
示例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);'>編輯 </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();
}