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


PHP _Header函数代码示例

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


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

示例1: UA

function UA($act, $cid)
{
    global $iCMS;
    $cookietime = $iCMS->config['diggtime'];
    $ajax = intval($_GET['ajax']);
    $cTime = time() - get_cookie($cid . '_up') > $cookietime && time() - get_cookie($cid . '_against') > $cookietime ? true : false;
    if ($cTime) {
        set_cookie($cid . '_' . $act, time(), $cookietime);
        if ($cid && iCMS_DB::query("UPDATE `#iCMS@__comment` SET `{$act}` = {$act}+1  WHERE `id` ='{$cid}'")) {
            $ajax ? jsonp("{state:'1'}", $_GET['callback']) : _Header($iCMS->config['publicURL'] . "/comment.php?indexId=" . $id);
        }
    } else {
        $ajax ? jsonp("{state:'0',text:'" . $iCMS->language('digged') . "' }", $_GET['callback']) : alert($iCMS->language('digged'));
    }
}
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:15,代码来源:action.php

示例2: UA

function UA($act, $cid)
{
    global $iCMS, $_iGLOBAL;
    $cookietime = $_iGLOBAL['cookie']['time'];
    $ajax = intval($_GET['ajax']);
    $ct = time() - get_cookie($cid . '_up') > $cookietime && time() - get_cookie($cid . '_against') > $cookietime ? true : false;
    if ($ct) {
        set_cookie($cid . '_' . $act, time(), $cookietime);
        if ($cid && $iCMS->db->query("UPDATE `#iCMS@__comment` SET `{$act}` = {$act}+1  WHERE `id` ='{$cid}'")) {
            $ajax ? jsonp("{state:'1'}", $_GET['callback']) : _Header($iCMS->dir . "comment.php?aid=" . $id);
        }
    } else {
        $ajax ? jsonp("{state:'0',text:'" . $iCMS->language('digged') . "' }", $_GET['callback']) : alert($iCMS->language('digged'));
    }
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:15,代码来源:action.php

示例3: intval

		function(data){
			if(data=='1'){
				redirect("admincp.php?do=message");
			}
		} 
	);
}
</script>

</body></html><?php 
        break;
    case 'del':
        $id = intval($_GET['id']);
        $id && $DreamCMS->db->query("DELETE FROM `#DC@__message` WHERE `id` ='{$id}'");
        _Header('admincp.php?do=message');
        break;
    case 'post':
        if (isset($_POST['delete'])) {
            foreach ($_POST['delete'] as $k => $id) {
                $id && $DreamCMS->db->query("DELETE FROM `#DC@__message` WHERE `id` ='{$id}'");
            }
            _Header('admincp.php?do=message');
        } else {
            alert("请选择要删除的留言!");
        }
        break;
}
//$DreamCMS->_print("message","admin");
?>

开发者ID:20000Hz,项目名称:bak-letvs,代码行数:29,代码来源:message.inc.php

示例4: save

            $table = $_POST['table'] ? save($_POST['table']) : '';
            //查询是否已经存在此表
            $tabledata = $DreamCMS->db->get_row("SELECT * FROM `#DC@__model` WHERE `table`='{$table}'", ARRAY_A);
            ($tabledata || $table == 'article' || $table == 'articledata') && alert('已经存在此表,请重新添加');
            $name = save($_POST['name']);
            $description = $_POST['description'] ? save($_POST['description']) : '';
            $DreamCMS->db->query("INSERT INTO `#DC@__model` (`name`,`description`,`table`) VALUES ('{$name}','{$description}','{$table}')");
            $modelid = $DreamCMS->db->insert_id;
            if ($modelid) {
                //查询默认表字段
                $morens = $DreamCMS->db->get_results("SELECT * FROM `#DC@__model_field` WHERE `modelid`=0 ORDER BY `disorder` ASC");
                if ($morens && is_array($morens)) {
                    foreach ($morens as $key => $val) {
                        $field = $val['field'];
                        $name = $val['name'];
                        $tips = $val['tips'];
                        $formtype = $val['formtype'];
                        $setting = $val['setting'];
                        $disorder = $val['disorder'];
                        $state = $val['state'];
                        $iszhu = $val['iszhu'];
                        $isfuzhi = 1;
                        $DreamCMS->db->query("INSERT INTO `#DC@__model_field` (`modelid`,`field`,`name`,`tips`,`formtype`,`setting`,`disorder`,`state`,`iszhu`,`isfuzhi`) VALUES ('{$modelid}','{$field}','{$name}','{$tips}','{$formtype}','{$setting}','{$disorder}','{$state}','{$iszhu}','{$isfuzhi}')");
                    }
                }
            }
            $DreamCMS->db->query("CREATE TABLE `#DC@__" . $table . "` (\n\t\t\t\t\t\t\t  `rid` int(10) unsigned NOT NULL auto_increment,\n\t\t\t\t\t\t\t  `aid` int(10) unsigned NOT NULL default '0',\n\t\t\t\t\t\t\t  PRIMARY KEY  (`rid`),\n\t\t\t\t\t\t\t  KEY `aid` (`aid`)\n\t\t\t\t\t\t\t) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
            _Header('admincp.php?do=modeltype');
        }
        break;
}
开发者ID:20000Hz,项目名称:bak-letvs,代码行数:31,代码来源:modeltype.inc.php

示例5: _Header

        _Header();
        break;
    case 'post':
        if ($action == 'edit') {
            if (isset($_POST['delete'])) {
                foreach ($_POST['delete'] as $k => $id) {
                    $id && $iCMS->db->query("DELETE FROM `#iCMS@__contentype` WHERE `id` ='{$id}'");
                }
                _Header();
            }
            foreach ($_POST['name'] as $id => $value) {
                $iCMS->db->query("update `#iCMS@__contentype` set `name`='{$value}',`type`='" . $_POST['type'][$id] . "',`val`='" . $_POST['val'][$id] . "' where `id`='{$id}'");
            }
            _Header();
        }
        if ($action == 'add') {
            $name = dhtmlspecialchars($_POST['name']);
            $type = dhtmlspecialchars($_POST['type']);
            $val = intval($_POST['val']);
            $iCMS->db->query("INSERT INTO `#iCMS@__contentype` (`name`,`val`,`type`) VALUES ('{$name}','{$val}','{$type}')");
            _Header(__SELF__ . '?do=contentype');
        }
        break;
    default:
        $Admin->MP("menu_contentype");
        $maxperpage = 20;
        $total = $iCMS->db->getValue("SELECT count(*) FROM `#iCMS@__contentype` order by id DESC");
        $rs = $iCMS->db->getArray("SELECT * FROM `#iCMS@__contentype` order by id DESC ");
        $_count = count($rs);
        include iCMS_admincp_tpl('contentype');
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:contentype.inc.php

示例6: _Header

        _Header();
        break;
    case 'open':
        $id = (int) $_GET['id'];
        $id && $DreamCMS->db->query("UPDATE `#DC@__keywords` SET `visible` = '1'  WHERE `id` ='{$id}'");
        _Header();
        break;
    case 'post':
        if ($action == 'edit') {
            if (isset($_POST['delete'])) {
                foreach ($_POST['delete'] as $k => $id) {
                    $id && $DreamCMS->db->query("DELETE FROM `#DC@__keywords` WHERE `id` ='{$id}'");
                }
                keywords_cache();
                _Header();
            }
            foreach ($_POST['name'] as $id => $value) {
                $DreamCMS->db->query("update `#DC@__keywords` set `keyword`='{$value}',`replace`='" . $_POST['replace'][$id] . "' where `id`='{$id}'");
            }
            keywords_cache();
            _Header();
        }
        if ($action == 'add') {
            $keyword = htmlspecialchars($_POST['keyword']);
            $replace = $_POST['replace'];
            $DreamCMS->db->query("insert into `#DC@__keywords`(`keyword`,`replace`,`addtime`,`visible`) values ('{$keyword}','{$replace}','" . time() . "','0')");
            keywords_cache();
            _Header('admincp.php?do=keywords');
        }
        break;
}
开发者ID:20000Hz,项目名称:bak-letvs,代码行数:31,代码来源:keywords.inc.php

示例7: doDelvlink

 function doDelvlink()
 {
     $id = (int) $_GET['id'];
     $fid = (int) $_GET['fid'];
     $id && ($vlink = iCMS_DB::getValue("SELECT vlink FROM `#iCMS@__article` WHERE `id`='{$id}'"));
     $vlinkArray = explode(',', $vlink);
     $key = array_search($fid, $vlinkArray);
     unset($vlinkArray[$key]);
     $vlink = implode(',', $vlinkArray);
     iCMS_DB::query("UPDATE `#iCMS@__article` SET `vlink` = '{$vlink}' WHERE `id` ='{$id}'");
     _Header();
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:12,代码来源:article.mo.php

示例8: exit

 * @copyright 2007-2009, iDreamSoft
 * @license http://www.idreamsoft.cn iDreamSoft
 * @author coolmoo <idreamsoft@qq.com>
 */
!defined('iPATH') && exit('What are you doing?');
switch ($operation) {
    case 'post':
        if ($action == 'edit') {
            $disable = explode("\r\n", dhtmlspecialchars($_POST['disable']));
            $filter = explode("\r\n", dhtmlspecialchars($_POST['filter']));
            if (is_array($filter)) {
                foreach ($filter as $k => $val) {
                    $filterArray[$k] = explode("=", $val);
                }
            }
            $iCMS->cache(false, 'include/syscache', 0, true, false);
            $iCMS->addcache('word.disable', $disable, 0);
            $iCMS->addcache('word.filter', $filterArray, 0);
            _Header(__SELF__ . '?do=filter');
        }
        break;
    default:
        $Admin->MP("menu_filter");
        $cache = $iCMS->cache(array('word.filter', 'word.disable'), 'include/syscache', 0, true);
        if (is_array($cache['word.filter'])) {
            foreach ($cache['word.filter'] as $k => $val) {
                $filterArray[$k] = implode("=", $val);
            }
        }
        include iCMS_admincp_tpl('filter');
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:filter.inc.php

示例9: intval

        $aid = intval($_GET['aid']);
        $id && $DreamCMS->db->query("UPDATE `#DC@__comment` SET `isexamine` = '0' WHERE `id` ='{$id}'");
        $aid && $DreamCMS->db->query("UPDATE `#DC@__article` SET `comments` = comments-1  WHERE `id` ='{$aid}'");
        _Header('admincp.php?do=comment');
        break;
    case 'del':
        $id = intval($_GET['id']);
        $aid = intval($_GET['aid']);
        $id && $DreamCMS->db->query("DELETE FROM `#DC@__comment` WHERE `id` ='{$id}'");
        $aid && $DreamCMS->db->query("UPDATE `#DC@__article` SET `comments` = comments-1  WHERE `id` ='{$aid}'");
        _Header('admincp.php?do=comment');
        break;
    case 'post':
        if ($action == "del") {
            if (isset($_POST['id'])) {
                foreach ($_POST['id'] as $k => $id) {
                    $aid = $_POST['aid'][$id];
                    $DreamCMS->db->query("DELETE FROM `#DC@__comment` WHERE `id` ='{$id}'");
                    $DreamCMS->db->query("UPDATE `#DC@__article` SET `comments` = comments-1  WHERE `id` ='{$aid}'");
                }
                _Header('admincp.php?do=comment');
            } else {
                alert("请选择要删除的评论!");
            }
        }
        break;
}
//$DreamCMS->_print("comment","admin");
?>

开发者ID:20000Hz,项目名称:bak-letvs,代码行数:29,代码来源:comment.inc.php

示例10: _Header

                    $iCMS->db->query("delete from `#iCMS@__links` where `id`='{$id}'");
                }
                _Header();
            }
            foreach ($_POST['name'] as $id => $value) {
                $iCMS->db->query("update `#iCMS@__links` set `name`='{$value}',`logo`='" . $_POST['logo'][$id] . "',`url`='" . $_POST['url'][$id] . "',`desc`='" . $_POST['description'][$id] . "',`orderid`='" . $_POST['displayorder'][$id] . "' where `id`='{$id}'");
            }
            _Header();
        }
        if ($action == 'add') {
            $name = dhtmlspecialchars($_POST['name']);
            $url = dhtmlspecialchars($_POST['url']);
            $desc = dhtmlspecialchars($_POST['description']);
            $logo = dhtmlspecialchars($_POST['logo']);
            $orderid = intval($_POST['displayorder']);
            empty($name) && alert('网站名称不能为空!');
            empty($url) && alert('网站URL不能为空!');
            strpos($url, 'http://') === false && ($url = 'http://' . $url);
            $iCMS->db->query("INSERT INTO `#iCMS@__links` (`name`,`logo`,`desc`,`url`,`orderid`) VALUES ('{$name}','{$logo}','{$desc}','{$url}','{$orderid}')");
            _Header(__SELF__ . "?do=link");
        }
        break;
    default:
        $Admin->MP(array("menu_index_link", "menu_link"));
        $maxperpage = 60;
        $total = $iCMS->db->getValue("SELECT count(*) FROM `#iCMS@__links` ORDER BY `logo`, `orderid` ASC");
        page($total, $maxperpage, '个链接');
        $rs = $iCMS->db->getArray("SELECT * FROM `#iCMS@__links` ORDER BY `logo`, `orderid` ASC LIMIT {$firstcount},{$maxperpage}");
        $_count = count($rs);
        include iCMS_admincp_tpl('link');
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:link.inc.php

示例11: keywords_cache

                keywords_cache();
                _Header();
            }
            foreach ($_POST['name'] as $id => $value) {
                $iCMS->db->query("update `#iCMS@__keywords` set `keyword`='{$value}',`replace`='" . $_POST['replace'][$id] . "' where `id`='{$id}'");
            }
            keywords_cache();
            _Header();
        }
        if ($action == 'save') {
            $id = (int) $_POST['id'];
            $keyword = dhtmlspecialchars($_POST['keyword']);
            $replace = $_POST['replace'];
            if (empty($id)) {
                $iCMS->db->query("insert into `#iCMS@__keywords`(`keyword`,`replace`,`addtime`,`visible`) values ('{$keyword}','{$replace}','" . time() . "','0')");
            } else {
                $iCMS->db->query("update `#iCMS@__keywords` set `keyword`='{$keyword}',`replace`='{$replace}' where id='{$id}'");
            }
            keywords_cache();
            _Header(__SELF__ . '?do=keywords');
        }
        break;
    default:
        $Admin->MP("menu_keywords");
        $maxperpage = 20;
        $total = $iCMS->db->getValue("SELECT count(*) FROM `#iCMS@__keywords` order by id DESC");
        page($total, $maxperpage, "个关键字");
        $rs = $iCMS->db->getArray("SELECT * FROM `#iCMS@__keywords` order by id DESC LIMIT {$firstcount},{$maxperpage}");
        $_count = count($rs);
        include iCMS_admincp_tpl('keywords');
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:keywords.inc.php

示例12: _Header

<?php

require_once 'functions.php';
require_once "../includes/global.php";
_Header("BillAd");
$date = $_POST["date"];
$amt = $_POST["amt"];
$cid = $_POST["cid"];
$sql = "INSERT INTO bill_record(Date,Cust_ID,Amount) VALUES('{$date}','{$cid}',{$amt})";
if ($mysqli->query($sql) === TRUE) {
    //update cust table
    $sql = "Update customer_details set Pending_Amount =  Pending_Amount + {$amt} where Cust_ID={$cid}";
    $mysqli->query($sql);
    //update ledger table
    //check if first entry
    $sql = "select Date from ledger where Date='{$date}'";
    echo $sql;
    $res = $mysqli->query($sql);
    if ($res->num_rows > 0) {
        echo "yess";
        $sql = "update ledger set Bill_Amount = Bill_Amount + {$amt} where Date='{$date}'";
        echo "<br>" . $sql;
        $mysqli->query($sql);
        echo "updated";
    } else {
        echo "noo";
        $sql = "insert into ledger values('{$date}',{$amt},0)";
        echo $sql;
        if ($mysqli->query($sql) === TRUE) {
            echo "Inserted";
        } else {
开发者ID:pbhopalka,项目名称:Account_Management,代码行数:31,代码来源:AddedBill.php

示例13: _Header

<?php

require_once "includes/global.php";
require_once "Customers/functions.php";
_Header("Ledger");
$sql = "SELECT * From ledger;";
//echo $sql."<br>";
$result = $mysqli->query($sql);
//echo "Query Called";
if ($result->num_rows > 0) {
    table_l();
    while ($row = $result->fetch_assoc()) {
        l_details($row);
    }
    end_table();
} else {
    echo "No Transactions Yet<br>";
}
_link("Index Page", "index.php");
开发者ID:pbhopalka,项目名称:Account_Management,代码行数:19,代码来源:ViewLedger.php

示例14: array

            $info = array();
            if ($_POST['pwd'] || $_POST['pwd1'] || $_POST['pwd2']) {
                $pwd = md5(trim($_POST['pwd']));
                $pwd1 = md5(trim($_POST['pwd1']));
                $pwd2 = md5(trim($_POST['pwd2']));
                if (!$_POST['pwd'] || !$_POST['pwd1'] || !$_POST['pwd2']) {
                    alert("修改密码.原密码,新密码,确认密码不能为空");
                }
                $pwd != $user['password'] && alert("原密码错误!");
                $pwd1 != $pwd2 && alert("新密码与确认密码不一致!");
                $iCMS->db->query("UPDATE `#iCMS@__members` SET `password` = '{$pwd2}' WHERE `uid` ='{$uid}' LIMIT 1");
            }
            //	    $username=dhtmlspecialchars($_POST['name']);
            $_POST['email'] && !eregi("^([_\\.0-9a-z-]+)@([0-9a-z][0-9a-z-]+)\\.([a-z]{2,6})\$", $_POST['email']) && alert("E-mail格式错误!!");
            $email = stripslashes($_POST['email']);
            $gender = intval($_POST['gender']);
            $info['nickname'] = dhtmlspecialchars(stripslashes($_POST['nickname']));
            cstrlen($info['nickname']) > 12 && alert("昵称长度大于12");
            $info['icq'] = intval($_POST['icq']);
            $info['home'] = dhtmlspecialchars(stripslashes($_POST['home']));
            $info['year'] = intval($_POST['year']);
            $info['month'] = intval($_POST['month']);
            $info['day'] = intval($_POST['day']);
            $info['from'] = dhtmlspecialchars(stripslashes($_POST['from']));
            $info['signature'] = dhtmlspecialchars(stripslashes($_POST['signature']));
            $user['info'] = $info;
            $iCMS->db->query("UPDATE `#iCMS@__members` SET `info` = '" . addslashes(serialize($user['info'])) . "',`email`='{$email}',`gender`='{$gender}' WHERE `uid` ='{$uid}' LIMIT 1");
            _Header(__SELF__ . '?do=setting&operation=profile');
        }
        break;
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:setting.inc.php

示例15: intval

            $quanxian['selectall'] = intval($_POST['selectall']);
            $quanxian['select'] = $_POST['select'];
            $quanxian['selectzilei'] = $_POST['selectzilei'];
            $quanxian['selectzileiall'] = $_POST['selectzileiall'];
            $quanxianids = serialize($quanxian);
            $up = $DreamCMS->db->query("update `#DC@__articletype` set `quanxianids`='{$quanxianids}' where `id`='{$id}'");
            if ($up !== false) {
                alert('更新成功!', 'url:1');
            } else {
                alert('更新失败!');
            }
        }
        if ($action == 'add') {
            $name = htmlspecialchars($_POST['name']);
            $DreamCMS->db->query("INSERT INTO `#DC@__articletype` (`name`) VALUES ('{$name}')");
            _Header('admincp.php?do=articletype');
        }
        break;
}
function catalog($cid = 0, $level = 1, $quanxianids = '')
{
    global $_catalog_array, $DreamCMS;
    if (isset($_catalog_array[$cid])) {
        foreach ($_catalog_array[$cid] as $root => $cata) {
            $selectzilei = '';
            $selectzileiall = '';
            $select = '';
            if ($quanxianids && is_array($quanxianids)) {
                $quanxianids['selectzilei'] && in_array($cata['id'], $quanxianids['selectzilei']) && ($selectzilei = " checked='checked' ");
                $quanxianids['selectzileiall'] && in_array($cata['id'], $quanxianids['selectzileiall']) && ($selectzileiall = " checked='checked' ");
                $quanxianids['select'] && in_array($cata['id'], $quanxianids['select']) && ($select = " checked='checked' ");
开发者ID:20000Hz,项目名称:bak-letvs,代码行数:31,代码来源:articletype.inc.php


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